In a generational garbage collector, a decision is made to pre-tenure, or
allocate new objects directly in the old generation, by a two step
process. In the first step, during a young-generation collection, the
number of bytes that survive collection is determined for each allocation
site and a predetermined number of sites with the highest number of
surviving bytes are selected as candidate sites. In the second step,
during a subsequent young-generation collection, the survival rates are
determined for the candidate sites and objects to be allocated from sites
with a sufficiently high survival rate are allocated directly in older
generations.