Patent ID: 8250121
Filing Date: 2012-08-21
Classification: G06F

Abstract:
1. A method for performing garbage collection promotion, comprising: receiving a request for allocation of an object; identifying the object as a large young object; allocating a plurality of large memory regions for the large young object in a garbage collector memory heap; setting to young a plurality of types of the plurality of large memory regions; hosting the large young object in the plurality of large memory regions; adding the large young object to a large young object list; initializing a counter comprising an age-adjusted size of the large young object to zero; incrementing the counter by a size of the large young object when the large young object is allocated; resetting the counter to zero when garbage collection of the young generation begins; increasing the counter by the size of the large young object right-shifted by an age of the large young object after the large young object is visited; determining, using the counter, that garbage collection is required prior to allocating a new object; determining that an age of the large young object is greater than a predetermined tenuring threshold, wherein the predetermined tenuring threshold specifies an age beyond which objects are promoted; setting the plurality of types of the plurality of large memory regions from young to old to promote the large young object to a large old object, wherein the plurality of large memory regions host the large young object; scavenging references of the large old object, wherein the large old object is a large promoted object; scanning the large young object list to identify a plurality of unvisited large young objects, wherein a plurality of visited bits of the plurality of unvisited large young objects are unset; and releasing a plurality of unvisited large memory regions, wherein the unvisited large memory regions host the plurality of unvisited large young objects.