Patent ID: 7853628

Claim:
A method in a data processing system having a program for allocating objects in a memory portion that includes a Young Generation and at least one Older Generation, said method comprising: (a) for each of the objects, determining whether at least one object should be allocated in said Young Generation in accordance with a first promotion policy exercised for promoting objects from said Young Generation to an Older Generation of said memory portion; (b) based on the determining whether each of the objects should be allocated using the first promotion policy, determining whether said at least one object should be allocated in said Young Generation in accordance with a second promotion policy exercised for at least postponing promoting objects from said Young Generation to said Older Generation relative to the first promotion policy, wherein the determination includes at least evaluating the characteristics of each of the objects of the set of objects to determine a likelihood that each object will become garbage within a predetermined number of garbage collection cycles, and wherein the objects to which the second promotion policy is applied are not evaluated in accordance with the first promotion policy; and (c) storing each of the objects in said Young Generation in accordance with said first or second promotion policy and providing an indication of said second promotion policy in a header for a subset of the objects, the indication used during a promoting step to preempt use of the first promotion policy.