Modern Programming Languages - Chapter 14
Problem: Find Current Heap Links
Basic problem is to find heap memory to be freed.
Start with the
: memory locations outside of
the heap with links into the heap
Active activation records (if on the stack)
Static variables, etc.
Dynamic allocations, for example:
Intlist a = new IntList(null);
For each memory location in the set, look at the
allocated block it points to, and add all the memory
locations in that block
Repeat until no new locations are found