摘要 |
Techniques are provided that speed synchronous garbage collection in systems that use reference counting. The present invention performs each of the steps of marking, scanning, and collecting on all nodes that are possibly nodes in a cycle of garbage. These nodes are referred to as "root" nodes herein. In other words, an aspect of the present invention performs the step of marking on each root node, the step of scanning on each root node, and the step of collecting on each root node. Performing one or more of these steps on all of the root nodes results in a lower number of operations than selecting single root nodes, performing these steps on each root node, and iterating until all root nodes are selected. Additionally, before root nodes are added to a buffer, they are examined to determine if they are already in the buffer. If they are, they are not added to the buffer. This prevents the same root node from being examined multiple times. Finally, nodes are examined to determine whether they are acyclic. Acyclic nodes are ignored when finding cyclic garbage.
|