Could you please answer me a question about JVM Garbage Collection process?
Why is heap divided into Eden, Survivor spaces and Old Generation?
When a young e
The division is very useful if you consider moving collectors. If there were no separation a young collection would leave a lot of holes in the heap, requiring either free list management or compaction of the old gen.
If on the other hand the young generation is implemented as a semi-space GC no such cleanup and tracking is required because the evacuated space will by definition only contain dead objects after a minor collection and can thus be considered free space afterwards. This also enables bump pointer allocation in the young gen.