One of the long-favored features of the Java platform is the behind-the-scenes garbage collection. An improvement goal was to create additional WhiteBox tests for humongous objects as a feature of the G1 garbage collector.
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 worked extremely well, but there was room for some improved efficiency. The way the G1 garbage collector worked was 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.
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...