US 7,321,909 B1 | ||
Method and apparatus for forwarding references to objects concurrently with space-incremental garbage collection | ||
Alexander T. Garthwaite, Beverly, Mass. (US) | ||
Assigned to Sun Microsystems, Inc., Santa Clara, Calif. (US) | ||
Filed on Dec. 23, 2004, as Appl. No. 11/21,287. | ||
Int. Cl. G06F 17/30 (2006.01) |
U.S. Cl. 707—206 | 28 Claims |
1. A method for forwarding references to objects concurrently with garbage collection using a space-incremental algorithm
in which objects are located in a first memory region having a starting address, the method comprising:
creating and associating a forwarding data structure with the first memory region;
when an object is evacuated from the first memory region in accordance with the algorithm, copying the object to a second
memory region;
calculating an index into the forwarding data structure based on a location of the object in the first memory region;
using the calculated index to write an address of the object copy in the second memory region into the forwarding data structure;
and
when the object is referenced in the first memory region, using the forwarding data structure to locate the object copy address
and causing the object copy to be accessed.
|