Split-reference, two-pass mark-compaction
First Claim
1. A method for compacting a computer memory heap, comprising:
- logically partitioning the heap into a plurality of logical blocks, wherein the heap comprises a plurality of reachable objects, wherein each of the plurality of reachable objects has a starting address in an associated one of plurality of blocks;
determining, for each of one or more of the plurality of reachable objects, an offset corresponding to a post-compaction address for the respective reachable object relative to a post-compaction address for an associated one of the blocks; and
wherein the respective offset for at least one of the one or more reachable objects is based on a combined size of one or more other reachable objects, wherein the at least one reachable object and the one or more other reachable objects are associated with a single associated one of the blocks.
2 Assignments
0 Petitions
Accused Products
Abstract
A heap may be marked and compacted while performing only two passes over the objects and object references in the heap. Specifically, objects and object references are traversed once during a marking phase and again during a compaction phase of split-reference, two-pass mark-compaction. Object references are updated in two steps. First, during marking, each object reference may be updated to include the relative offset within its block of the referenced object and-during compaction that offset may be added to the block'"'"'s destination address resulting in a reference that points to the actual post-compaction location for the referenced object. Objects of a particular block may be rearranged, or permuted, with respect to each other within the block. However, the order between groups of objects in different blocks may be preserved across compaction.
-
Citations
25 Claims
-
1. A method for compacting a computer memory heap, comprising:
-
logically partitioning the heap into a plurality of logical blocks, wherein the heap comprises a plurality of reachable objects, wherein each of the plurality of reachable objects has a starting address in an associated one of plurality of blocks; determining, for each of one or more of the plurality of reachable objects, an offset corresponding to a post-compaction address for the respective reachable object relative to a post-compaction address for an associated one of the blocks; and wherein the respective offset for at least one of the one or more reachable objects is based on a combined size of one or more other reachable objects, wherein the at least one reachable object and the one or more other reachable objects are associated with a single associated one of the blocks. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12)
-
-
13. A device, comprising:
-
a processor; and a memory coupled to the processor, wherein the memory comprises program instructions configured to; logically partition the heap into a plurality of logical blocks, wherein the heap comprises a plurality of reachable objects, wherein each of the plurality of reachable objects has a starting address in an associated one of plurality of blocks; determine, for each of one or more of the plurality of reachable objects, an offset corresponding to a post-compaction address for the respective reachable object relative to a post-compaction address for an associated one of the blocks; and wherein for at least one of the one or more reachable objects, the respective offset is based on a combined size of one or more other reachable objects, wherein the at least one reachable object and the one or more other reachable objects are associated with a single associated one of the blocks. - View Dependent Claims (14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24)
-
-
25. A computer accessible medium, comprising program instructions executable to implement:
-
logically partitioning the heap into a plurality of logical blocks, wherein the heap comprises a plurality of reachable objects, wherein each of the plurality of reachable objects has a starting address in an associated one of plurality of blocks; determining, for each of one or more of the plurality of reachable objects, an offset corresponding to a post-compaction address for the respective reachable object relative to a post-compaction address for an associated one of the blocks; and wherein for at least one of the one or more reachable objects, the respective offset is based on a combined size of one or more other reachable objects, wherein the at least one reachable object and the one or more other reachable objects are associated with a single associated one of the blocks.
-
Specification