Content deleted Content added
clarifying steps |
why the forwarding pointer is used |
||
Line 8:
* '''Objects referenced by objects on the stack.''' Once this has been done, the garbage collector examines all object references in the objects that have been migrated to the to-space, and performs one of the above two actions on the referenced object.
Once all to-space references have been examined and updated, garbage collection is complete.
The aforementioned forwarding pointer is used only during the garbage collection process: When a reference to an object already in to-space (thus having a forwarding pointer in from-space) is found, the reference can be updated quickly simply by updating its pointer to match the forwarding pointer.
Because the strategy is to exhaust all live references, and then all references in referenced objects, this is known as a ''breadth-first'' list copying garbage collection scheme.
==References==
|