Version 12 - 2019-03
HotSpot Virtual Machine Garbage Collection Tuning Guide, release 12 pdf (🔗 original link)
Shenandoah [JEP 189]
🔗 Shenandoah Garbage Collector - experimental in java 12.
Work from Red Hat, described in the paper Shenandoah - An open-source concurrent compacting garbage collector for OpenJDK (🔗 original link)
Collector that does concurrent compacting by adding a forwarding pointer to each object. When an object is moved by GC, the forwarding pointer is updated.
Explained at 🔗 Java Magazine -> Understanding the JDK’s New Superfast Garbage Collectors
Shenandoah can relocate objects concurrently with the application. To achieve the concurrent relocation, it uses what’s known as a Brooks pointer. This pointer is an additional field that each object in the Shenandoah heap has and which points back to the object itself.
Shenandoah does this because when it moves an object, it also needs to fix up all the objects in the heap that have references to that object. When Shenandoah moves an object to a new location, it leaves the old Brooks pointer in place, forwarding references to the new location of the object. When an object is referenced, the application follows the forwarding pointer to the new location.