For Sun/Oracle\'s JVM, I\'ve read that the GC algo divides new generation into one Eden region and two survivor regions. What I\'m wondering about is, why two survivor regio
All the current answer talk about memory fragmentation, this is also another reason to have generations in GC.
The runtime records all “old objects” that point to “new objects”, this is done every time a “pointer” field is updated. Then when a “minor” GC is done, only “new” objects need to be scanned.
Over the years it has been found that just have “new” and “old” is not enough, and it is good to have a 3rd generation that is “middle aged”.