liveBook · Manning

Survivor region

As explained in Troubleshooting Java, Second Edition

A survivor region is a young-generation heap region that holds objects which remain reachable after young-generation garbage collections.

A survivor region is a young-generation heap region that holds objects remaining reachable after young-generation garbage collections. Objects begin in Eden; survivors move between two survivor areas before eventual promotion to the old generation. section 11.1

This organization helps interpret garbage-collection behavior. Eden is cleaned frequently, survivor regions less often, and objects that remain useful across enough GC cycles move to the old generation. section 11.1

Read survivor-region changes in GC logs by asking:

  • Did a young collection move reachable objects out of Eden? section 11.1
  • Did the survivor-region count increase, showing that some objects remained alive? section 11.1
  • Are objects continuing through survivor areas toward the old generation? section 11.1

Reading one collection

After GC(0), the log reports `Eden regions: 4->0(5)`, `Survivor regions: 0->1(1)`, and `Old regions: 0->0`. Eden was emptied, one survivor region now contains retained objects, and no objects were promoted to the old generation yet. section 11.1

Use the heap-lifecycle diagram to follow objects as they age through Eden, survivor regions, and the old generation. section 11.1

How Troubleshooting Java, Second Edition covers it

How deep it goes
Explains Eden-to-survivor movement, two-area shuffling, and promotion, then stops short of collector implementation details.
Examples
Shows `Survivor regions: 0->1(1)` alongside Eden and old-region counts after a G1 young collection.
What it assumes
Assumes basic JVM memory knowledge while defining Eden, survivor regions, old generation, and garbage collection through analogy.
What you can do after
Diagnose object-aging patterns by reading survivor-region changes in GC logs.
How it connects
Connects survivor regions with Eden, old generation, garbage collection, object promotion, and GC logs.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Troubleshooting Java, Second Edition. The section links point to the parts of the book it draws on.