Method and apparatus for forwarding references to objects concurrently with space-incremental garbage collection
First Claim
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.
2 Assignments
0 Petitions
Accused Products
Abstract
In order to prevent concurrent garbage collection using a space-incremental algorithm from corrupting objects, objects are evacuated by copying them to relocated destinations and a forwarding data structure is associated with each region created by the space-incremental algorithm. The forwarding data structure is used to map object locations in that region to their relocated destinations. When an attempt is made to access the object, the forwarding data structure is accessed and, if the object is found in the data structure, the corresponding forwarding address is used to access the object. The forwarding data structure can be a hash table, a direct mapped table or other structure.
82 Citations
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. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12)
-
-
13. Apparatus 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 apparatus comprising:
-
a mechanism that creates and associates a forwarding data structure with the first memory region; a mechanism operable when an object is evacuated from the first memory region in accordance with the algorithm, that copies the object to a second memory region; a mechanism that calculates an index into the forwarding data structure based on a location of the object in the first memory region; a mechanism that uses the calculated index to write an address of the object copy in the second memory region into the forwarding data structure; and a mechanism operable when the object is referenced in the first memory region, that uses the forwarding data structure to locate the object copy address and causing the object copy to be accessed. - View Dependent Claims (14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24)
-
-
25. Apparatus 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 apparatus comprising:
-
means for creating and associating a forwarding data structure with the first memory region; means operable when an object is evacuated from the first memory region in accordance with the algorithm, for copying the object to a second memory region; means for calculating an index into the forwarding data structure based on a location of the object in the first memory region; means for using the calculated index to write an address of the object copy in the second memory region into the forwarding data structure; and means operable when the object is referenced in the first memory region, for using the forwarding data structure to locate the object copy address and for causing the object copy to be accessed. - View Dependent Claims (26, 27)
-
-
28. A computer readable medium comprising computer program code stored therein 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 computer program code comprising:
-
program code for creating and associating a forwarding data structure with the first memory region; program code operable when an object is evacuated from the first region in accordance with the algorithm, for copying the object to a second memory region; program code for calculating an index into the forwarding data structure based on a location of the object in the first memory region; program code for using the calculated index to write an address of the object copy in the second memory region into the forwarding data structure; and program code operable when the object is referenced in the first memory region, for using the forwarding data structure to locate the object copy address and for causing the object copy to be accessed.
-
Specification