Abstract

Generational garbage collection is an established method for creating efficient garbage collectors. Even a simple implementation where all nodes that survive one garbage collection are tenured, i.e., moved to an old generation, works well in strict languages. In lazy languages, however, such an implementation can create severe temporary space leaks.To completely abandon the idea with generational garbage collection for lazy languages is however an overkill since the fundamental idea behind generational garbage collection, that the mortality of young nodes are higher than for old nodes, is valid also for lazy languages.This paper describes a generational garbage collector that avoids many of the temporary space leaks introduced by a simple generational collector. The main differences between this generational collector and other generational collectors are that no test is needed before updating nodes, and the way aging of nodes are handled. The latter makes it very easy to have different tenure policies for nodes of different types. The former makes it possible to change between non-generational and generational garbage collection at run-time. This is an advantage as the choice of garbage collector often depends on the amount of memory available when runing the program.The garbage collector is implemented for the Chalmers Lazy-ML/Haskell compiler, and is compared with the original two-space copying garbage collector and a simple generational garbage collector that tenures all nodes that survive one collection.KeywordsGarbage CollectionGarbage CollectorTenure NodeDead NodeUpdateable NodeThese keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call