Additional tests for humongous objects in G1 [JEP 278]
One of the long-favored features of the Java platform is the behind the scenes garbage collection. JEP 278's focus was to create additional WhiteBox tests for humongous objects as a feature of the G1 garbage collector.
Note
WhiteBox testing is an API used to query JVM internals. The WhiteBox testing API was introduced in Java 7 and upgraded in Java 8 and Java 9.
The G1 garbage collector works extremely well, but there was room for some improved efficiency. The way the G1 garbage collector worked is based on first dividing the heap into regions of equal size, illustrated as follows:
The problem with the G1 garbage collector was how humongous objects were handled.
Note
A humongous object in the context of garbage collection, is any object that takes up more than one region on the heap.
The problem with humongous objects was that if they took up any part of a region on the heap, the remaining space was not able to be allocated for other objects...