Adaptive scanning reduces sweep time for the Lisp2 mark-compact garbage collector

Mark-compact garbage collection helps long-running programs avoid fragmentation. The Lisp2 mark-compact collector is a classic but still widely-used compaction algorithm. It sequentially scans the entire heap to compact all live objects at one end of the heap while preserving their order of addresses. Since the heap is generally large, this scanning takes a long time. Although some collectors adopt a separate bitmap into which mark bits of objects are stored to reduce the scanning time, we observed that scanning the bitmap can take longer than scanning the heap if objects are densely located. We propose a new scanning method from this observation, which adaptively alternates methods of scanning depending on heap usage; it scans those parts of the heap where live objects are densely located whereas it scans the bitmap for the remaining parts. We implemented this scanning method in the Lisp2 collector of Jikes RVM. The experimental results revealed that the adaptive scanner scanned faster than the method that only scanned the heap and the method that only scanned the bitmap.

[1]  Hans-Juergen Boehm,et al.  Garbage collection in an uncooperative environment , 1988, Softw. Pract. Exp..

[2]  Soo-Mook Moon,et al.  Reducing sweep time for a nearly empty heap , 2000, POPL '00.

[3]  Erez Petrank,et al.  An efficient parallel heap compaction algorithm , 2004, OOPSLA.

[4]  David R. Hanson,et al.  Performance of Storage Management in an Implementation of SNOBOL4 , 1978, IEEE Transactions on Software Engineering.

[5]  Perry Cheng,et al.  Myths and realities: the performance impact of garbage collection , 2004, SIGMETRICS '04/Performance '04.

[6]  Amer Diwan,et al.  The DaCapo benchmarks: java benchmarking development and analysis , 2006, OOPSLA '06.

[7]  Rafael Dueire Lins,et al.  Garbage collection: algorithms for automatic dynamic memory management , 1996 .

[8]  Francis C. M. Lau,et al.  Index-Compact Garbage Collection , 2010, APLAS.

[9]  Chen Yang,et al.  A Fully Parallel LISP2 Compactor with Preservation of the Sliding Properties , 2008, LCPC.

[10]  Richard E. Jones,et al.  The Garbage Collection Handbook: The art of automatic memory management , 2011, Chapman and Hall / CRC Applied Algorithms and Data Structures Series.

[11]  Barry Hayes,et al.  Using key object opportunism to collect old objects , 1991, OOPSLA '91.

[12]  Antony L. Hosking,et al.  Reducing generational copy reserve overhead with fallback compaction , 2006, ISMM '06.

[13]  Patrick Sobalvarro,et al.  A Lifetime-based Garbage Collector for LISP Systems on General- Purpose Computers , 1988 .

[14]  David M. Ungar,et al.  Generation Scavenging: A non-disruptive high performance storage reclamation algorithm , 1984, SDE 1.

[15]  Vivek Sarkar,et al.  The Jikes Research Virtual Machine project: Building an open-source research community , 2005, IBM Syst. J..

[16]  Erez Petrank,et al.  The Compressor: concurrent, incremental, and parallel compaction , 2006, PLDI '06.

[17]  Atsushi Ohori,et al.  An efficient non-moving garbage collector for functional languages , 2011, ICFP.