Premium
Compacting Garbage Collection can be Fast and Simple
Author(s) -
Clarke Charles L. A.,
Mason David V.
Publication year - 1996
Publication title -
software: practice and experience
Language(s) - English
Resource type - Journals
SCImago Journal Rank - 0.437
H-Index - 70
eISSN - 1097-024X
pISSN - 0038-0644
DOI - 10.1002/(sici)1097-024x(199602)26:2<177::aid-spe7>3.0.co;2-7
Subject(s) - garbage collection , copying , garbage , manual memory management , heuristic , simple (philosophy) , computer science , generalization , measure (data warehouse) , object (grammar) , memory leak , database , programming language , artificial intelligence , mathematics , mathematical analysis , philosophy , epistemology , political science , law
Abstract Copying garbage collectors are now standard for the memory‐management subsystems of functional and object‐oriented programming languages. Compacting garbage collection has correspondingly fallen out of favor. We revitalize the case for compaction by demonstrating that a simple compacting collector, extended with the generational garbage collection heuristic, exhibits performance as effectively as or better than a well‐designed generational copying collector on real programs running in real environments. The observation that compaction preserves allocation order across collections leads to a new generalization of the generational heuristic that reduces the movement of long‐lived objects. We measure the effect of substituting our compacting generational collector for a copying collector in Standard ML of New Jersey.