Patent ID: 7676511
Filing Date: 2010-03-09
Classification: G06F

Abstract:
1. A method for pre-tenuring new object memory allocation in a generational garbage collector, comprising: determining, using a dynamic profiling technique, a frequency of execution of a plurality of code blocks; selecting a plurality of allocation sites within the plurality of code blocks, wherein each of the plurality of allocation sites is a point within the plurality of code blocks where an object is instantiated, wherein instantiation of the object allocates memory space for the object; determining a frequency of execution of the plurality of allocation sites; initiating a memory collection of a first young generation; selecting a plurality of candidate sites with highest frequencies of execution from the plurality of allocation sites, wherein the remaining allocation sites comprise non-selected allocation sites, and wherein a frequency of execution of the plurality of candidate sites allocates more bytes than a frequency of execution of the non-selected allocation sites; completing the memory collection of the first young generation; initiating a memory collection of a second young generation after the completion of the memory collection of the first young generation; counting bytes allocated to each of the plurality of candidate sites after initiating the memory collection of the second young generation; determining, for each of the plurality of candidate sites, a survival rate of allocated bytes that survive memory collection based on counting bytes allocated; and storing to an older generation in a memory heap a plurality of objects from the plurality of candidate sites with survival rates greater than a predetermined threshold.