Dynamic feedback for determining collection-set size
AssigneeSun Microsystems, Inc.
InventorAlexander T. Garthwaite
Life of this patent
Estimating the term…
Abstract
A garbage collector collects a generation of a dynamically allocated heap in a computer's memory incrementally. A collection set within the generation is associated with each collection increment. The collector reclaims for reuse the memory space occupied by any collection-set object not reachable by a reference chain that extends from outside the collection set. The collector monitors the total amount of allocation that occurs within the generation between collection increments, and it bases the collection-set size on those allocation amounts.
Claims25
For employing a computer system, which includes memory of which at least some is used as a heap for dynamic allocation, to perform garbage collection incrementally on an incrementally collected generation of the heap, a method comprising:
- A) monitoring the rate of allocation within the incrementally collected generation;
- B) calculating collection-set sizes from the allocation rates thus monitored;
- and
- C) collecting the generation in increments that employ collection sets whose minimum sizes are the collection-set sizes thus determined.
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 it to treat at least a heap portion of the memory as a heap, in which dynamic allocation occurs, and act as a garbage collector that incrementally collects an incrementally collected generation of the heap by:
- i) monitoring the rate of allocation within the incrementally collected generation;
- ii) calculating collection-set sizes from the allocation rates thus monitored;
- and
- iii) collecting the generation in increments that employ collection sets whose minimum sizes are the collection-set sizes thus determined.
A storage medium containing instructions readable by a computer system that includes memory to configure the computer system to treat at least a portion of the memory as a heap, in which dynamic allocation occurs, and act as a garbage collector that incrementally collects an incrementally collected generation of the heap by:
- A) monitoring the rate of allocation within the incrementally collected generation;
- B) calculating collection-set sizes from the allocation rates thus monitored;
- and
- C) collecting the generation in increments that employ collection sets whose minimum sizes are the collection-set sizes thus determined.
For incrementally collecting an incrementally collected generation of a heap where dynamic allocation occurs in a computer system's memory, a garbage collector including:
- A) means for monitoring the rate of allocation within the incrementally collected generation;
- B) means for calculating collection-set sizes from the allocation rates thus monitored;
- and
- C) means for collecting the generation in increments that employ collection sets whose minimum sizes are the collection-set sizes thus determined.
Dependencies are inferred from the claim text.