Efficient Memory Management for Long-Lived Objects

Generational garbage collectors perform well for short-lived objects, but do not deal well with long-lived objects. Existing techniques for long-lived objects, such as pretenuring, eliminate work in the nursery; however, the collector still needs to deal with the long-lived objects in the older generations. We introduce a novel scheme employing regions that avoids both nursery and old generation costs.

Our scheme divides the heap into two sub-heaps: a garbage collected heap and a region heap. Most objects are allocated in the garbage collected heap, while long-lived objects are allocated in regions. The scheme maintains reference counts to the regions, and reclaims regions when their count drops to zero. The memory management mechanism is decoupled from the region selection policy. Region selection policies may range from manual to fully automatic. This paper presents a particular realization for our memory management scheme over an Appel-style generational garbage collector. This realization includes an automatic profile-based region selection technique. Evaluating our algorithm using a garbage collection simulator, it reduces copying by 10% on average when compared to Appel in tight heaps.

By: Ronny Morad; Martin Hirzel; Elliot K. Kolodner; Mooly Sagiv

Published in: RC24794 in 2009

LIMITED DISTRIBUTION NOTICE:

This Research Report is available. This report has been submitted for publication outside of IBM and will probably be copyrighted if accepted for publication. It has been issued as a Research Report for early dissemination of its contents. In view of the transfer of copyright to the outside publisher, its distribution outside of IBM prior to publication should be limited to peer communications and specific requests. After outside publication, requests should be filled only by reprints or legally obtained copies of the article (e.g., payment of royalties). I have read and understand this notice and am a member of the scientific community outside or inside of IBM seeking a single copy only.

rc24794.pdf

Questions about this service can be mailed to reports@us.ibm.com .