Patent ID: 7617264

Claim:
A computer implemented method for performing garbage collection in a multithreaded environment, comprising: obtaining a collection set of objects in a computer system, wherein the collection set is associated with a collector interval of a collection cycle; partitioning the collection set of objects into a plurality of sections, wherein a section of the plurality of sections corresponds to memory of the computer system and is associated with a remembered set; partitioning the section into a plurality of segments, wherein a first segment of the plurality of segments corresponds to a portion of the memory of the computer system; obtaining a first count-map for the section, wherein the first count-map is associated with a first thread executing on a processor of the computer system, and wherein a first entry in the first count-map is associated with the first segment of the plurality of segments; identifying a first plurality of references to objects in the first segment using the remembered set; incrementing the first entry based on a size of the first plurality of references; comparing the first entry with a popular-object threshold to generate a first comparison; and evacuating a first object from the first segment based on the first comparison to reclaim the portion of the memory of the computer system for reuse.