3 essential JGC actions af marking

In this write-up, let’s put aside “live vs dead” object marking, and focus on actions after marking. Across all the GC engines as of java 5, there are only 3 post-deallocation actions.

C) copier action young generation
Coping needs a “destination” space in the form of the survivors. So copier is inapplicable to oldgen

S) sliding compaction action => oldgen
F) non-relocating free-list action => oldgen

(notation — the arrow sign “A=>B” means “A requires/implies B”)

Among the 3, C and S create “frontiers” to support fast allocation at the expense of long pauses. F offers low-pause but fragmentation.

Among the 3, C is always young gen. S and F are always oldgen.

Once you are clear about these 3 GC actions, you understand a lot of jargons such as

concurrent GC
promotion failure

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s