Mark and Sweep Garbage Collection
Mark:
- The Stack and global data is scanned for pointers on The Heap
- Found blocks are marked as reachable. Then the reachable blocks are scanned for pointers to more reachable blocks (and so on)
Sweep:
- Blocks not marked as reachable are deallocated
No compaction.