Placement of allocation trains in the train algorithm
First Claim
1. A method for employing a computer system that includes memory to collect garbage in accordance with the train algorithm in at least a generation of a dynamically allocated heap in the memory, the method comprising:
- A) treating a generation of a collected heap in the memory as divided into car sections that belong to trains linked in a front-to-rear order;
B) collecting the generation in collection increments, in each of which a collection set of at least one car section is collected in accordance with the train algorithm such that cars in trains, which are in front of other trains in the front-to-rear order, are collected before cars in the other trains; and
C) linking cars in to a train that is linked ahead of at least one other train each of at least some cars into which objects are directly allocated;
D) objects directly allocated before a predetermined time threshold in an interval between collection increments, are allocated in a set of at least one early-object car, and those directly allocated after the predetermined time threshold in the interval are allocated in a set of at least one different, late-object car; and
E) the trains into which the at least one early-object car and at least one late-object care are linked are not the same.
2 Assignments
0 Petitions
Accused Products
Abstract
A garbage collector collects a dynamically allocated heap by employing the train algorithm, in which “car” sections of a heap generation are organized in groups, or “trains.” When a car section comes up for collection, objects that it contains are evacuated if they are referred to by references located in cars not currently being collected. The cars to which they are evacuated belong to the trains that contain the references. The trains form a sequence in which their constituent cars are to be collected, and objects that are directly allocated in the generation are placed into trains that precede some existing train in the collection sequence.
47 Citations
25 Claims
-
1. A method for employing a computer system that includes memory to collect garbage in accordance with the train algorithm in at least a generation of a dynamically allocated heap in the memory, the method comprising:
-
A) treating a generation of a collected heap in the memory as divided into car sections that belong to trains linked in a front-to-rear order; B) collecting the generation in collection increments, in each of which a collection set of at least one car section is collected in accordance with the train algorithm such that cars in trains, which are in front of other trains in the front-to-rear order, are collected before cars in the other trains; and C) linking cars in to a train that is linked ahead of at least one other train each of at least some cars into which objects are directly allocated; D) objects directly allocated before a predetermined time threshold in an interval between collection increments, are allocated in a set of at least one early-object car, and those directly allocated after the predetermined time threshold in the interval are allocated in a set of at least one different, late-object car; and E) the trains into which the at least one early-object car and at least one late-object care are linked are not the same. - View Dependent Claims (2, 3, 4, 5, 6)
-
-
7. 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 a generation of a dynamically allocated heap as divided into car sections that belong to trains linked in a front-to-rear order; ii) collects the generation in collection increments, in each of which a collection set of at least one car section is collected in accordance with the train algorithm such that cars in trains which are in front of other trains in the front-to-rear order, are collected before cars in the other trains; iii) links into a train that is linked ahead of at least one other train each of at least some cars into which objects are directly allocated; C) objects directly allocated before a predetermined time threshold in an interval between collection increments are allocated in a set of at least one early-object car, and those directly allocated after the predetermined threshold in the interval are allocated in a set of at least one different, late-object car; and D) the trains into which the at least one early-object car and at least one late-object car are linked are not the same. - View Dependent Claims (8, 9, 10, 11, 12)
-
-
13. A storage medium containing instructions readable by a computer including memory to configure the computer to operate as a garbage collector that:
-
A) treats a generation of a dynamically allocated heap as divided into car sections that belong to trains linked in a front-to-rear order; B) collects the generation in collection increments, in each of which a collection set of at least one car section is collected in accordance with the train algorithm such that cars in trains which are in front of other trains in the front-to-rear order, are collected before cars in the other trains; C) links into a train that is linked ahead of at least one other train each of at least some cars into which objects are directly allocated; C) objects directly allocated before a predetermined time threshold in an interval between collection increments are allocated in a set of at least one early-object car, and those directly allocated after the predetermined threshold in the interval are allocated in a set of at least one different, late-object car; and D) the trains into which the at least one early-object car and at least one late-object car are linked are not the same. - View Dependent Claims (14, 15, 16, 17, 18)
-
-
19. A computer program product comprising a tangible computer usable medium having computer readable program code thereon representing sequences of instructions that, when executed by a computer system including memory, cause it to operate as a garbage collector that:
-
A) treats a generation of a dynamically allocated heap as divided into car sections that belong to trains linked in a front-to-rear order; B) collects the generation in collection increments, in each of which a collection set of at least one car section is collected in accordance with the train algorithm such that cars in trains which are in front of other trains in the front-to-rear order, are collected before cars in the other trains; C) links into a train that is linked ahead of at least one other train each of at least some cars into which objects are directly allocated; C) objects directly allocated before a predetermined time threshold in an interval between collection increments are allocated in a set of at least one early-object car, and those directly allocated after the predetermined threshold in the interval are allocated in a set of at least one different, late-object car; and D) the trains into which the at least one early-object car and at least one late-object car are linked are not the same. - View Dependent Claims (20, 21, 22, 23, 24)
-
-
25. A garbage collector program operation in the memory of a computer and comprising:
-
A) means for treating a generation of a collected heap in a computer system'"'"'s memory as divided in car section that belong to trains linked in front-to-rear order; B) collecting the generation in collection increments, in each of which a collection set of at least one car section is collected in accordance with the train algorithm such that cars in trains, which are in front of other trains in the front-to-rear order are collected before cars in the other trains; C) linking into a train that is linked ahead of at least one other train each of at least some cars into which objects are directly allocated; D) objects directly allocated before a predetermined time threshold in an interval between collection increments are allocated in a set of at least one early-object car, and those directly allocated after the predetermined threshold in the interval are allocated in a set of at least one different, late-object car; and E) the trains into which the at least one early-object car and at least one late-object car are linked are not the same.
-
Specification