Patent ID: 7480782

Claim:
A method for compacting a memory heap of a computer, comprising: logically partitioning the heap into a plurality of chunks, wherein the heap comprises a plurality of reachable objects, wherein each of the reachable objects comprises one or more reachable memory locations, and wherein one or more of the reachable objects of one or more of the plurality of chunks comprises one or more references to a respective one or more other reachable objects of the heap; for each of the plurality of chunks: determining a range-edge referenced address referenced by the one or more references of the respective chunk; determining whether the range-edge referenced address for the respective chunk comprises an address within a region of the heap to be relocated during heap compaction; updating the one or more references of the respective chunk if the range-edge referenced address for the respective chunk comprises an address within a region of the heap to be relocated during heap compaction; and not updating one or more references in the respective chunk if the range-edge referenced address for the respective chunk comprises an address within a region of the heap that is not to be relocated during heap compaction.