Patent ID: 7209935

Claim:
A method for updating a remembered set in a garbage collector using a train algorithm configured to divide heap memory into a young generation and an old generation and collects a collection set of a plurality of heap memory segments grouped into a plurality of trains during successive collection increments, the method comprising: prior to performing a remembered set updating operation during a collection increment, using the garbage collector to identify the plurality of heap memory segments in the old generation, wherein the plurality of heap memory segments are part of a collection-set subset which is collected in a next successive collection increment; performing the next successive collection increment; identifying a mutator-modified heap memory segment from the plurality of heap memory segments; scanning the mutator-modified heap memory segment to locate a plurality of references therein; performing a memorialization operation, wherein the memorialization operation excludes the plurality of references located in the mutator-modified heap memory segment from update in a remembered set; placing an entry identifying a location of one of the plurality of references from the remembered set into a scratchpad list associated with one of the plurality of trains; and processing the heap memory segment based on the scratchpad list, wherein the entry from the remembered set is placed in the scratchpad list without being recorded in the remembered set.