Detection of dead regions during incremental collection
First Claim
1. 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.
2 Assignments
0 Petitions
Accused Products
Abstract
A garbage collector employs the train algorithm to collect a heap generation incrementally, collecting “car sections” in a collection order. As it updates the “remembered sets” by which it keeps track of where references to objects in respective car sections are located, it also updates oldest- and youngest-car indicators for each car section. The oldest- and youngest-car indicators for a given car section specify limits in the collection sequence beyond which references to objects in the given car have not been found. The garbage collector uses these indicators to identify cars that contain no objects that are reachable except through a reference chain that includes the collection set for the current collection increment. It adds one or more such cars to the collection set, and it collects the thus-expanded collection set without processing the remembered sets associated with the added cars.
-
Citations
68 Claims
-
1. 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. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14)
-
-
15. 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 of 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 oldest-region indicator associated therewith, the oldest-region indicator associated with a given region identifying a region such that no region older 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 oldest-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 regions that contain no reachable objects are 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. - View Dependent Claims (16, 17, 18, 19, 20, 21, 22)
-
-
23. A computer system comprising:
-
A) processor circuitry operable to execute processor instructions; and B) memory circuitry, to which the processor circuitry is responsive, that contains processor instructions readable by the processor circuitry to configure the computer system as a garbage collector that; i) treats at least a generation of a garbage collected heap in the memory 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. - View Dependent Claims (24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36)
-
-
37. A computer system comprising:
-
A) processor circuitry operable to execute processor instructions; and B) memory circuitry, to which the processor circuitry is responsive, that contains processor instructions readable by the processor circuitry to configure the computer system as a garbage collector that; i) treats at least a generation of a garbage collected heap in the memory as divided into regions assigned a collection order from oldest to youngest; ii) maintains for each of a plurality of the regions a respective oldest-region indicator associated therewith, the oldest-region indicator associated with a given region identifying a region such that no region older 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 oldest-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 regions that contain no reachable objects are 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. - View Dependent Claims (38, 39, 40, 41, 42, 43, 44)
-
-
45. A storage medium containing instructions readable by a computer system that includes memory to configure the computer to operate as a garbage collector that:
-
A) treats at least a generation of a garbage collected heap in the computer system'"'"'s memory as divided into regions assigned a collection order from oldest to youngest; B) 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 C) during each of at least some collection increments; i) 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; ii) if any such region is thereby identified, includes at least a portion of at least one such region in the collection set; and D) reclaims space occupied by unreachable objects in the collection set. - View Dependent Claims (46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58)
-
-
59. A storage medium containing instructions readable by a computer system that includes memory to configure the computer to operate as a garbage collector that:
-
A) treats at least a generation of a garbage collected heap in the computer system'"'"'s memory as divided into regions assigned a collection order from oldest to youngest; B) maintains for each of a plurality of the regions a respective oldest-region indicator associated therewith, the oldest-region indicator associated with a given region identifying a region such that no region older than the region thereby identified contains a strong reference to an object in the given region; and C) during each of at least some collection increments; i) performs a region search by employing the oldest-region indicators to attempt to identify regions that are unreachable, at least with respect to the portion or the heap outside the collection set; ii) if any regions that contain no reachable objects are thereby identified, includes at least a portion of at least one such region in the collection set; and D) reclaims space occupied by unreachable objects in the collection set. - View Dependent Claims (60, 61, 62, 63, 64, 65, 66)
-
-
67. A garbage collector operating in the memory of a computer comprising:
-
A) means for treating at least a generation of a garbage collected heap in a computer system'"'"'s memory as divided into regions assigned a collection order from oldest to youngest; B) means for maintaining 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 C) means for, during each of at least some collection increments; i) performing 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; ii) if any such region is thereby identified, including at least a portion of at least one such region in the collection set; and iii) reclaiming space occupied by unreachable objects in the collection set.
-
-
68. A garbage collector operating in the memory of a computer comprising:
-
A) means for treating at least a generation of a garbage collected heap in a computer system'"'"'s memory as divided into regions assigned a collection order from oldest to youngest; B) means for maintaining for each of a plurality of the regions a respective oldest-region indicator associated therewith, the oldest-region indicator associated with a given region identifying a region such that no region older than the region thereby identified contains a strong reference to an object in the given region; and C) means for, during each of at least some collection increments; i) performing a region search by employing the oldest-region indicators to attempt to identify regions that are unreachable, at least with respect to the portion or the heap outside the collection set; ii) if any regions that contain no reachable objects are thereby identified, including at least a portion of at least one such region in the collection set; and iii) reclaiming space occupied by unreachable objects in the collection set.
-
Specification