•Basic problem is to find heap memory to be freed.
•
1.Start with the root
set: 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);
2.For each memory location in the set, look at the allocated block it points to, and add all the memory locations in that block
3.Repeat until no new locations are found