Mark and sweep walkthrough: trace reachable objects from the roots in the mark phase, then free everything unmarked in the sweep phase.

Heap objects
0
Marked alive
0
Garbage freed
0
Phase
idle
Unmarked
Scanning
Marked (alive)
Garbage
ROOTS HEAP
What's happening
Step 1 / 11