Skip to main content

G1 Garbage Collector

Learn G1 Garbage Collector (Garbage Collection, Java) with worked examples, diagrams and interview questions. Free on JavaSchoolLab.

6. Basic Concepts What is G1? G1 (short for Garbage-First ) is a garbage collector built into the JVM that tries to balance two goals at once: keeping pause times short and predictable, while still collecting garbage efficiently even on large heaps (multiple gigabytes). Since Java 9 , G1 is the default garbage collector for most JVM configurations, replacing the older Parallel GC as the out-of-the-box choice.

More lessons in Garbage Collection