Patent ID: 7143124

Claim:
A method of performing garbage collection comprising: A) providing a computer system that includes memory and executes a mutator that modifies references in a dynamically allocated heap in the memory; B) configuring the computer system to act as a garbage collector that collects respective collection sets in collection increments and that: i) treats at least a generation in the heap as divided into regions assigned a collection order from oldest to youngest; ii) maintains for each of a plurality of the regions a respective youngest-region indicator associated therewith, the youngest-region indicator associated with a given region identifying a region such that no region younger than the region thereby identified contains a strong reference to an object in the given region; and iii) during each of at least some collection increments: a) performs a region search by employing the youngest-region indicators to attempt to identify regions that are unreachable, at least with respect to the portion or the heap outside the collection set; b) if any such region is thereby identified, includes at least a portion of at least one such region in the collection set; and c) reclaims space occupied by unreachable objects in the collection set; C) employing the computer system to execute the garbage collector.