The old generation is the heap region for objects that survive long enough in Survivor regions to be promoted for long-term use. Because it holds longer-lived objects, garbage collection cleans it less often than Eden. section 11.1
Use old-generation behavior as a diagnostic signal when reading GC logs:
- Track whether objects move from Eden through Survivor regions into the old generation. section 11.1
- Compare old-generation occupancy before and after collections; frequent full collections may indicate memory pressure or a leak. section 11.5
- Interpret old-generation patterns alongside pause times and heap utilization rather than treating one GC event as a complete diagnosis. section 11.5
Reading an old-generation entry
A log line such as “Old regions: 0->0” shows that a collection left the old-generation region count unchanged. The same event moved Eden regions from 4 to 0 and Survivor regions from 0 to 1, indicating a young-collection transition without promotion into the old generation. section 11.1
Use the heap-lifecycle illustration to follow how object age and repeated GC survival determine movement between Eden, Survivor, and old-generation regions. section 11.1
