Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In Oracle's Java Virtual Machine's Garbage Collector, what are the respective roles of "survivor 1" and "survivor 2" ?

Are the objects always moving like: Eden → Survivor 1 → Survivor 2

Or can an object jump directly from Eden to Survivor 2?

Would a "Survivor 3" make no sense, or it could be OK but it was deemed that two are enough?

share|improve this question
up vote 2 down vote accepted

Survivor1 and Survivor2 are used alternately. Minor GCs scan everything in one survivor space, and move anything that's still needed into the other one, so exactly two are needed.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.