Now that Java 24 is features complete (Rampdown Phase One at the day of writing), it’s time to walk through all the functionalities that bring to us, developers, this new version.
This article is part of a series on what’s new on the last versions of Java, for those who wants to read the others, here are the links: Java 23, Java 22, Java 21, Java 20, Java 19, Java 18, Java 17, Java 16, Java 15, Java 14, Java 13, Java 12, Java 11, Java 10, and Java 9.
Shenandoah is a Garbage Collector (GC) originally developed by RedHat and included in OpenJDK. It reduces GC pause times by performing evacuation work concurrently to application threads.
Until now, Shenandoah was not generational, meaning that it did not separate the heap into several zones containing objects of different ages. Generational GCs are based on the Weak Generational Hypotesis: most objects die young. As collecting a dead object is very cheap, separating young objects from old ones means you can focus on the young objects to clean the heap more efficiently.
All existing GCs are generational, even ZGC, which wasn’t at the begining, but since this release only supports generational mode. Shenandoah is catching up by adding an experimental generational mode.