mark-and-sweep
another GC technique
- not as widely used as stop and copy
- basic idea
in mark phase: trace all structure accessible from registers, and mark it
in sweep phase: scan all of memory, and make unmarked memory available
advantages
- can use almost all the memory
disadvantages
- sweep phase checks all of memory, even if small amount used
- isn’t compacting like stop-and-copy