Java 12 launches multiplex improvement to its garbage collection algorithms.

JEP 189 – Shenandoah: A Low-Pause-Time Garbage Collector (Experimental)

An experimental Low-Pause-Time Garbage Collector, Shenandoah is announced to lower down the GC pause time. It works in alignment with processing java threads. This assists to lower down the province of GC over stack size and makes it regular. Now Garbage collection pause time would be the same for 2 MB and also for 2 GB stack space.

Shenandoah is awaiting to be part of the leading JAVA launch with Java 15.

JEP 346 – Promptly Return Unused Committed Memory

With Java 12, G1 will start processing java heap space if the application is not active and might launch the memory to the operating system. This preemptive behavior preserves and free memory.

JEP 344: Abortable Mixed Collections

With Java 12, G1 planning has been enhanced. Now G1 assorted collections are abortable if they surpass the given pause limit. Now mixed collections are dispersed into compulsory and optional. G1 collectors can give priority to the compulsory sets to check the pause time aim.