Skip to content

JVM Generational Model

The JVM Generational Model is a memory management strategy based on the observation that the majority of objects created in an application are short-lived ("die young").^[600-developer__JVM.md]

This model partitions the heap into distinct generations to optimize garbage collection performance.^[600-developer__JVM.md]

Key Principles

  • Weak Generational Hypothesis: The foundational concept that most objects become unreachable quickly, while others remain for extended periods.^[600-developer__JVM.md]
  • Generational Separation: The heap is divided into specific areas to handle objects differently based on their age.^[600-developer__JVM.md]

Structure

The Java heap is typically divided into two main logical generations:

  • Young Generation: A dedicated space for newly allocated objects.^[600-developer__JVM.md] Because most objects here become garbage quickly, this region utilizes efficient garbage collection algorithms designed for high throughput and frequent reclamation of short-lived objects.^[600-developer__JVM.md]
  • Old Generation (Tenured Generation): A space for objects that have survived multiple garbage collection cycles in the Young Generation.^[600-developer__JVM.md] This region stores long-lived objects and is typically larger, but garbage collection is performed less frequently.^[600-developer__JVM.md]
  • [[JVM]]
  • [[Garbage Collection]]
  • [[Heap Memory]]

Sources

  • 600-developer__JVM.md