Avoiding remembered-set maintenance overhead for memory segments known to be in a collection set
First Claim
1. For employing a computer system that includes a memory to operate as a garbage collector that collects at least a portion of the memory in collection increments in which it collects respective collection sets of the memory and that treats at least a portion of the memory as divided into memory segments and maintains remembered sets respectively associated with the memory segments, a method comprising:
- A) during each collection increment;
i) scanning for references to objects in the collection set the locations outside the collection set identified by entries in each remembered set associated with a memory segment in the collection set;
ii) evacuating from the collection set any objects referred to by references thereby found; and
iii) reclaiming the memory space occupied by the collection set; and
B) before each of at least some collection increments;
i) identifying a collection-set subset that includes at least a subset of the memory segments that will belong to the collection set collected during that collection increment; and
ii) performing reference-memorialization operations in which;
a) the locations of at least some references not located in the collection-set subset thus identified that refer to objects are recorded in the remembered sets associated with the memory segments containing those objects if those remembered sets do not already include entries that identify them; and
b) no reference that is located in the collection-set subset thus identified is recorded in a remembered set.
2 Assignments
0 Petitions
Accused Products
Abstract
A garbage collector that employs the train algorithm to manage a generation in a computer system'"'"'s dynamically allocated heap maintains for each of the generation'"'"'s cars a respective remembered set that identifies all locations where references to objects in that car have been found by scanning locations identified by the mutator as having been modified. To avoid some of the expense of remembered-set updating, the collector refrains from attempting to add to a remembered set any reference located in a car that will be collected during the next collection increment. Additionally, if no mutator operation will occur before a collection set of one or more cars will be collected, any reference located outside that collection set but referring to an object within the collection set is not recorded in a remembered set but is recorded instead in a scratch-pad list of entries that identify references to collection-set objects that need to be evacuated.
69 Citations
30 Claims
-
1. For employing a computer system that includes a memory to operate as a garbage collector that collects at least a portion of the memory in collection increments in which it collects respective collection sets of the memory and that treats at least a portion of the memory as divided into memory segments and maintains remembered sets respectively associated with the memory segments, a method comprising:
-
A) during each collection increment;
i) scanning for references to objects in the collection set the locations outside the collection set identified by entries in each remembered set associated with a memory segment in the collection set;
ii) evacuating from the collection set any objects referred to by references thereby found; and
iii) reclaiming the memory space occupied by the collection set; and
B) before each of at least some collection increments;
i) identifying a collection-set subset that includes at least a subset of the memory segments that will belong to the collection set collected during that collection increment; and
ii) performing reference-memorialization operations in which;
a) the locations of at least some references not located in the collection-set subset thus identified that refer to objects are recorded in the remembered sets associated with the memory segments containing those objects if those remembered sets do not already include entries that identify them; and
b) no reference that is located in the collection-set subset thus identified is recorded in a remembered set. - View Dependent Claims (2, 3, 4, 5)
-
-
6. For employing a computer system that includes a memory to operate as a garbage collector that collects at least a portion of the memory according to the train algorithm in collection increments in which it collects respective collection sets of the memory and that treats at least that portion of the memory as divided into car sections grouped into trains and maintains remembered sets respectively associated with the car sections, a method comprising:
-
A) during each collection increment;
i) providing scratch-pad lists associated with respective trains;
ii) scanning for references to objects in the collection set the locations outside the collection set identified by entries in each remembered set associated with a car section in the collection set;
iii) placing into the scratch-pad lists entries that identify the locations of the references thereby found;
iv) evacuating from the collection set any objects referred to by references whose locations the scratch-pad lists identify; and
v) reclaiming the memory space occupied by the collection set; and
B) before each of at least some collection increments;
i) identifying a collection-set subset that includes at least a subset of the car sections that will belong to the collection set collected during that collection increment; and
ii) performing reference-memorialization operations in which;
a) the locations of at least some references not located in the collection-set subset thus identified that refer to objects are recorded in the remembered sets associated with the car sections containing those objects if those remembered sets do not already include entries that identify them; and
b) the locations of at least some references to objects in the collection-set subset thus identified are, without having first been recorded in the remembered sets associated with the car sections containing those objects, recorded in the scratch-pad lists associated with the trains to which the car sections containing those references belong. - View Dependent Claims (7)
-
-
8. 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) collects at least a portion of the memory in collection increments in which it collects respective collection sets of the memory;
ii) treats at least a portion of the memory as divided into memory segments;
iii) maintains remembered sets respectively associated with the memory segments;
iv) during each collection increment;
a) scans for references to objects in the collection set the locations outside the collection set identified by entries in each remembered set associated with a car section in the collection set;
b) evacuates from the collection set any objects referred to by references thereby found; and
c) reclaims the memory space occupied by the collection set; and
v) before each of at least some collection increments;
a) identifies a collection-set subset that includes at least a subset of the car sections that will belong to the collection set collected during that collection increment; and
b) performs reference-memorialization operations in which;
(1) the locations of at least some references not located in the collection-set subset thus identified that refer to objects are recorded in the remembered sets associated with the car sections containing those objects if those remembered sets do not already include entries that identify them; and
(2) no reference that is located in the collection-set subset thus identified is recorded in a remembered set. - View Dependent Claims (9, 10, 11, 12)
-
-
13. A computer system comprising:
-
A) processor circuitry operable to execute processor instructions;
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) collects at least a portion of the memory according to the train algorithm in collection increments in which it collects respective collection sets of the memory;
ii) treats the at least a portion of the memory as divided into car sections grouped into trains;
iii) maintains remembered sets respectively associated with the car sections;
iv) during each collection increment;
a) provides scratch-pad lists associated with respective trains;
b) scans for references to objects in the collection set the locations outside the collection set identified by entries in each remembered set associated with a car section in the collection set;
c) places into the scratch-pad lists entries that identify the locations of the references thereby found;
d) evacuates from the collection set any objects referred to by references whose locations the scratch-pad lists identify; and
e) reclaims the memory space occupied by the collection set; and
v) before each of at least some collection increments;
a) identifies a collection-set subset that includes at least a subset of the car sections that will belong to the collection set collected during that collection increment; and
b) performs reference-memorialization operations in which;
(1) the locations of at least some references not located in the collection-set subset thus identified that refer to objects are recorded in the remembered sets associated with the car sections containing those objects if those remembered sets do not already include entries that identify them; and
(2) the locations of at least some references to objects in the collection-set subset thus identified are, without having first been recorded in the remembered sets associated with the car sections containing those objects, recorded in the scratch-pad lists associated with the trains to which the car sections containing those references belong. - View Dependent Claims (14)
-
-
15. A storage medium containing instructions readable by a computer system that includes memory to configure the computer system to operate as a garbage collector that:
-
A) collects at least a portion of the memory in collection increments in which it collects respective collection sets of the memory;
B) treats at least a portion of the memory as divided into memory segments;
C) maintains remembered sets respectively associated with the memory segments;
D) during each collection increment;
i) scans for references to objects in the collection set the locations outside the collection set identified by entries in each remembered set associated with a car section in the collection set;
ii) evacuates from the collection set any objects referred to by references thereby found; and
iii) reclaims the memory space occupied by the collection set; and
E) before each of at least some collection increments;
i) identifies a collection-set subset that includes at least a subset of the car sections that will belong to the collection set collected during that collection increment; and
ii) performs reference-memorialization operations in which;
a) the locations of at least some references not located in the collection-set subset thus identified that refer to objects are recorded in the remembered sets associated with the car sections containing those objects if those remembered sets do not already include entries that identify them; and
b) no reference that is located in the collection-set subset thus identified is recorded in a remembered set. - View Dependent Claims (16, 17, 18, 19)
-
-
20. A storage medium containing instructions readable by a computer system that includes memory to configure the computer system to operate as a garbage collector that:
-
A) collects at least a portion of the memory according to the train algorithm in collection increments in which it collects respective collection sets of the memory;
B) treats that portion of the memory as divided into car sections grouped into trains;
C) maintains remembered sets respectively associated with the car sections;
D) during each collection increment;
i) provides scratch-pad lists associated with respective trains;
ii) scans for references to objects in the collection set the locations outside the collection set identified by entries in each remembered set associated with a car section in the collection set;
iii) places into the scratch-pad lists entries that identify the locations of the references thereby found;
iv) evacuates from the collection set any objects referred to by references whose locations the scratch-pad lists identify; and
v) reclaims the memory space occupied by the collection set; and
E) before each of at least some collection increments;
i) identifies a collection-set subset that includes at least a subset of the car sections that will belong to the collection set collected during that collection increment; and
ii) performs reference-memorialization operations in which;
a) the locations of at least some references not located in the collection-set subset thus identified that refer to objects are recorded in the remembered sets associated with the car sections containing those objects if those remembered sets do not already include entries that identify them; and
b) the locations of at least some references to objects in the collection-set subset thus identified are, without having first been recorded in the remembered sets associated with the car sections containing those objects, recorded in the scratch-pad lists associated with the trains to which the car sections containing those references belong. - View Dependent Claims (21)
-
-
22. An electromagnetic signal representing sequences of instructions that, when executed by a computer system that includes memory, cause the computer system to operate as a garbage collector that:
-
A) collects at least a portion of the memory in collection increments in which it collects respective collection sets of the memory;
B) treats at least a portion of the memory as divided into memory segments;
C) maintains remembered sets respectively associated with the memory segments;
D) during each collection increment;
i) scans for references to objects in the collection set the locations outside the collection set identified by entries in each remembered set associated with a car in the collection set;
ii) evacuates from the collection set any objects referred to by references thereby found; and
iii) reclaims the memory space occupied by the collection set; and
E) before each of at least some collection increments;
i) identifies a collection-set subset that includes at least a subset of the car sections that will belong to the collection set collected during that collection increment; and
ii) performs reference-memorialization operations in which;
a) the locations of at least some references not located in the collection-set subset thus identified that refer to objects are recorded in the remembered sets associated with the car sections containing those objects if those remembered sets do not already include entries that identify them; and
b) no reference that is located in the collection-set subset thus identified is recorded in a remembered set. - View Dependent Claims (23, 24, 25, 26)
-
-
27. An electromagnetic signal representing sequences of instructions that, when executed by a computer system that includes memory, cause the computer system to operate as a garbage collector that:
-
A) collects at least a portion of the memory according to the train algorithm in collection increments in which it collects respective collection sets of the memory;
B) treats that portion of the memory as divided into car sections grouped into trains;
C) maintains remembered sets respectively associated with the car sections;
D) during each collection increment;
i) provides scratch-pad lists associated with respective trains;
ii) scans for references to objects in the collection set the locations outside the collection set identified by entries in each remembered set associated with a car section in the collection set;
iii) places into the scratch-pad lists entries that identify the locations of the references thereby found;
iv) evacuates from the collection set any objects referred to by references whose locations the scratch-pad lists identify; and
v) reclaims the memory space occupied by the collection set; and
E) before each of at least some collection increments;
i) identifies a collection-set subset that includes at least a subset of the car sections that will belong to the collection set collected during that collection increment; and
ii) performs reference-memorialization operations in which;
a) the locations of at least some references not located in the collection-set subset thus identified that refer to objects are recorded in the remembered sets associated with the car sections containing those objects if those remembered sets do not already include entries that identify them; and
b) the locations of at least some references to objects in the collection-set subset thus identified are, without having first been recorded in the remembered sets associated with the car sections containing those objects, recorded in the scratch-pad lists associated with the trains to which the car sections containing those references belong. - View Dependent Claims (28)
-
-
29. A garbage collector comprising:
-
A) means for collecting at least a portion of a computer system'"'"'s memory in collection increments in which respective collection sets of the memory are collected;
B) means for treating at least a portion of the memory as divided into memory segments and maintaining remembered sets respectively associated with the memory segments;
C) means for, during each collection increment;
i) scanning for references to objects in the collection set the locations outside the collection set identified by entries in each remembered set associated with a car section in the collection set;
ii) evacuating from the collection set any objects referred to by references thereby found; and
iii) reclaiming the memory space occupied by the collection set; and
D) means for, before each of at least some collection increments;
i) identifying a collection-set subset that includes at least a subset of the car sections that will belong to the collection set collected during that collection increment; and
ii) performing reference-memorialization operations in which;
a) the locations of at least some references not located in the collection-set subset thus identified that refer to objects are recorded in the remembered sets associated with the car sections containing those objects if those remembered sets do not already include entries that identify them; and
b) no reference that is located in the collection-set subset thus identified is recorded in a remembered set.
-
-
30. A garbage collector comprising:
-
A) means for collecting at least a portion of the memory according to the train algorithm in collection increments in which respective collection sets of the memory are collected;
B) means for treating at least a portion of the memory as divided into car sections grouped into trains and maintaining remembered sets respectively associated with the car sections;
C) means for, during each collection increment;
i) providing scratch-pad lists associated with respective trains;
ii) scanning for references to objects in the collection set the locations outside the collection set identified by entries in each remembered set associated with a car section in the collection set;
iii) placing into the scratch-pad lists entries that identify the locations of the references thereby found;
iv) evacuating from the collection set any objects referred to by references whose locations the scratch-pad lists identify; and
v) reclaiming the memory space occupied by the collection set; and
D) means for, before each of at least some collection increments;
i) identifying a collection-set subset that includes at least a subset of the car sections that will belong to the collection set collected during that collection increment; and
ii) performing reference-memorialization operations in which;
a) the locations of at least some references not located in the collection-set subset thus identified that refer to objects are recorded in the remembered sets associated with the car sections containing those objects if those remembered sets do not already include entries that identify them; and
b) the locations of at least some references to objects in the collection-set subset thus identified are, without having first been recorded in the remembered sets associated with the car sections containing those objects, recorded in the scratch-pad lists associated with the trains to which the car sections containing those references belong.
-
Specification