garbage collector in android 2.3

2019-01-24 21:45发布

问题:

From the Google groups I came to know that android 2.3 is using concurrent garbage collector. From the source code i can see that it uses both copying collector as well as mark and sweep, my question is whether the concurrency has been implemented in mark and sweep GC or in copying GC.please help me soon in this

回答1:

By default concurrency means, concurrent mark and sweep garbage collector only. So in android 2.3 concurrent mark and sweep is used for stack related objects treating everything as pointer and copying garbage collection is used for the objects in the heap.