mark-compact

What's the Mark-Compact algorithm used by HotSpot?

对着背影说爱祢 提交于 2019-12-24 07:26:06
问题 When reading the Mark-Compact chapter on The Garbage Collection Handbook, a sequence of alternatives were presented, but most of them looked old / theoretical (for instance, the 2-finger compaction and the Lisp2 3-pass approach requiring an extra header word per object). Is anyone aware of what algorithm does HotSpot uses when running Mark-Compact (in its old-generation, I assume)? Thanks 回答1: Big disclaimer: I am not a GC expert/writer; all the things that are written bellow are subject to