Why serial gc evacuates the whole heap rather than just To+Old spaces?

kelthuzadx 1948638989 at qq.com
Sat May 25 12:13:17 UTC 2019


Hi I'm reading the hotspot serial gc source code recently, but I've had a puzzling problem. As I understand, FastScanClosure would copy objects from Eden+From spaces or promote to old generation when age was reached to threshold. After this phase, only To+Old spaces has object reference, which means we can evacuate their followers from these spaces. Why [FastEvacuationFollowersClosure](http://hg.openjdk.java.net/jdk/jdk12/file/06222165c35f/src/hotspot/share/gc/serial/serialHeap.inline.hpp#l33) evacuates the whole heap rather than just To+Old space?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/hotspot-gc-dev/attachments/20190525/a8c20b93/attachment.htm>


More information about the hotspot-gc-dev mailing list