Patent ID: 8195721

Claim:
A system that enables garbage collection in a virtual machine environment, comprising: a computer, including a computer readable medium and processor operating thereon; a virtual machine for executing one or more software applications; a memory space for use by the virtual machine in storing software objects, and pointers, as part of the one or more software applications; and wherein the system maintains the memory space in a condition suitable for deterministic garbage collection, including (a) determining a pause time limit for garbage collection, (b) selecting a compaction area within the memory space, (c) during a marking phase, determining as referrers those pointers within the memory space that point to objects within the selected compaction area, and creating a list identifying each object in the compaction area being referred-to, and the referrers to that object, (d) setting a compaction time limit for a compaction phase, wherein the time limit for the compaction phase is a fractional value of the pause time limit; (e) during the compaction phase, selecting a particular object within the compaction area, and for that particular object, determining that, when the number of referrers to that particular object is above a defined threshold, that particular object should not be moved within the compaction area at this time, and wherein when the number of referrers to the particular object is below the defined threshold, the particular object is moved within the compaction area to reduce free memory space between the objects in the compaction area and the referrers are updated accordingly, and (f) selecting a next object within the compaction area and repeating step (e) for each remaining object in the compaction area, or until the compaction is aborted.