Patent ID: 7519640
Filing Date: 2009-04-14
Classification: G06F,Y10S

Abstract:
1. A computer system including memory, a mutator and a garbage collector, wherein the garbage collector treats a generation of a heap in the memory as divided into a plurality of car sections grouped into a plurality of trains each ordered in a collection order and configured to collect in collection increments respective collection sets of those car sections in accordance with a train algorithm, wherein the computer system is configured to implement a method wherein, in a collection increment of the collection increments: the garbage collector evacuates a first object from a respective collection set in response to the existence of a weak reference associated with the first object, wherein an object associated solely with a weak reference is evacuated from the respective collection set, prior to reclamation of the respective collection set, based upon a determination that a predetermined amount of unused space is remaining in the heap, and wherein the weak reference is denoted by placement of the weak reference in a second object defined by the mutator as belonging to a predetermined class associated with weak references; the garbage collector selects one of the plurality of trains into which the first object is evacuated from the respective collection set in response to determining the existence of a reference to the object located in the generation, wherein the one of the plurality of trains is selected independently of the reference's location when the reference corresponds solely to a weak reference; and the garbage collector thereafter reclaims the respective collection set as allocatable memory.