Generational Garbage Collection

Many workloads create short-lived objects. Generational strategies exploit this by treating young and older objects differently.

Allocation
   |
   v
Young regions
   |
   | survivors
   v
Older regions
   |
   v
Reclamation / compaction as required

Exact mechanics depend on the collector. Modern collectors such as G1 use regions rather than a simple contiguous physical young/old layout.

The performance question is whether allocation rate, live-set size, collector behavior, and pause characteristics match the application's goals.

Key Takeaways
  • Generational GC exploits object lifetime patterns.
  • GC performance depends on allocation rate and live-set characteristics.
  • Measure real allocation and pause behavior before tuning.