Thoughts on Reachability
The marking algorithm visits each node and each edge at most once. Why?
This marking algorithm uses Depth First Search. DFS uses a stack to track nodes. Where?
Graph reachability is closely related to garbage collection
- the nodes are blocks of memory
- marking starts at all global and active local variables
- the marked blocks are reachable from a variable
- unmarked blocks are garbage