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

  • Authors:
  • Kazuya Morikawa;Tomoharu Ugawa;Hideya Iwasaki

  • Affiliations:
  • The University of Electro-Communications, Chofu, Japan;The University of Electro-Communications, Chofu, Japan;The University of Electro-Communications, Chofu, Japan

  • Venue:
  • Proceedings of the 2013 international symposium on memory management
  • Year:
  • 2013

Quantified Score

Hi-index 0.00

Visualization

Abstract

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.