Mark-compact walkthrough: mark live objects, compute forwarding addresses, fix up every pointer, then slide survivors down to close the gaps.
Live objects
0
Garbage
0
Free slots
1
Phase
idle
Mark
›
Compute addresses
›
Fixup pointers
›
Move
ROOTS
HEAP — ADDRESS 0 → 7
What's happening
Prev
Next step
Auto
Restart
Step 1