As I know, there are two GC modes in the dalvikvm. One is ConcurrentMarkSweep and the other is Copying.
Only one mode will be compiled in the run time.
And the default mode is the concurrent mark sweep GC. The concurrent is only used in gc mark sweep step. And in GC process, the full steps are:
- Suspend all other threads
- Root mark(thread stacks, jni references, class static fields & class objects)
- Resume all threads expect itself
- Concurrent mark sweep which is depend on the gc mark-bitmap. Here, the other threads are in the running status
- Suspend all other threads
- Root mark again
- Mark dirty objects by cardtable
- Suspend threads
- Concurrent sweep