performing garbage collection • Roots: pointers directly reachable from the stack • Precise: all pointers can be identified by default, the opposite being “conservative” • Write barrier: code that runs upon writing a pointer to an object • Stop the world: an event during which all mutators are paused
roots and their child pointers 3. Record which objects are reachable 4. Reclaim memory of unreachable objects 5. Optional: compact the heap to prevent fragmentation