Oldest-First Garbage Collection

Abstract

An oldest-first generational garbage collector leaves intact the most recently allocated object space, and instead collects the remaining, older objects. Because these older objects have had more time to die, an oldest-first copying collector will generally do less copying than a traditional generational collector (which operates youngest-first), a non-generational collector, and even Clinger and Hansen’s non-predictive collector (which does wait a little while for objects to die). To explore the performance of oldest-first collection, we present a mathematical analysis, simulation results for a variety of mature object lifetime distributions, and simulation results for mature object lifetimes drawn from real programs and for real mature object traces. These results demonstrate that oldest-first collection does perform significantly better than youngest-first or non-generational collection for mature objects. Although some previous work pointed in this direction, it provided very little evidence of our conclusion. We also find that oldest-first collection works well for lifetime distributions that satisfy the generational hypothesis, which suggests we should also consider oldest-first collection in the young object space.

Publication
Technical Report UM-CS-1998-081, Department of Computer Science, University of Massachusetts