Index-Compact Garbage Collection

  • Liangliang Tong
  • Francis C. M. Lau
Part of the Lecture Notes in Computer Science book series (LNCS, volume 6461)


Automatic garbage collection is currently adopted by many object-oriented programming systems. Among the many variants, a mark-compact garbage collector offers high space efficiency and cheap object allocation, but suffers from poor virtual memory interactions. It needs to linearly scan through the entire available heap, triggering many page faults which may lead to excessively long collection time. We propose building an object reference index while tracing the heap, which in the following stages can be used to directly locate the live objects. As the dead objects are not touched, the collection time becomes dependent only on the size of the live data set. We have implemented a prototype in Jikes RVM, which shows promising results with the SPECjvm98 benchmarks.


Index Virtual Memory Compacting Garbage Collection 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    McCarthy, J.: Recursive Functions Symbolic Expressions and Their Computation by Machine. Communication of the ACM 3(4), 184–195 (1960)CrossRefzbMATHGoogle Scholar
  2. 2.
    Saunders, R.A.: The LISP System for the Q-32 Computer. In: Berkeley and Bobrow, pp. 220–231 (1964)Google Scholar
  3. 3.
    Martin, J.J.: An efficient garbage compaction algorithm. Communications of the ACM 25(8), 571–580 (1982)MathSciNetCrossRefzbMATHGoogle Scholar
  4. 4.
    Morris, F.L.: A Time- and Space- Efficient Garbage Compaction Algorithm. Communications of the ACM 21(8), 662–665 (1978)CrossRefzbMATHGoogle Scholar
  5. 5.
    Kermany, H., Petrank, E.: The Compressor: Concurrent, Incremental, and Parallel Compaction. In: ACM Conference on Programming Language Design and Implementation, pp. 354–363 (2006)Google Scholar
  6. 6.
    Jones, R., Lins, R.: Garbage Collection: Algorithm for Automatic Dynamic Memory Management. John Wiley&Sons, Chichester (1997)zbMATHGoogle Scholar
  7. 7.
    Wilson, P.R.: Uniprocessor Garbage Collection Techniques. In: Proceedings of the International Workshop on Memory Management, pp. 1–42 (1992)Google Scholar
  8. 8.
    Haddon, B.K., Waite, W.M.: A Compaction Procedure for Variable Length Storage Element. The Computer Journal 10(2), 162–165 (1967)CrossRefzbMATHGoogle Scholar
  9. 9.
    Lieberman, H., Hewitt, C.: A Real-time Garbage Collection Based on the Lifetimes of Objects. Communication of the ACM 26(6), 419–429 (1983)CrossRefGoogle Scholar
  10. 10.
    MaGachey, P., Hosking, A.L.: Reducing Generational Copy Reserve Overhead with Fallback Compaction. In: International Symposium on Memory Management, pp. 17–28 (2006)Google Scholar
  11. 11.
    Blackburn, S.M., Cheng, P., McKinley, K.S.: Oil and Water? High Performance Garbage Collection in Java with MMTk. In: International Conference on Software Engineering, pp. 137–146 (2004)Google Scholar
  12. 12.
    Alpern, B., Augart, S., Blackburn, S.M.: The Jikes Research Virtual Machine Project: Building an Open-source Research Community. IBM Systems Journal special issue on Open Source Software 44(2), 399–417 (2005)Google Scholar
  13. 13.
    Alpern, B., Attanasio, C.R., Barton, J.J.: The Jalapeno Virtual Machine. IBM Systems Journal 39(1), 211–238 (2000)CrossRefGoogle Scholar
  14. 14.
    Cheney, C.J.: A Nonrecursive List Compacting Algorithm. Communication of the ACM 13(11), 677–678 (1970)CrossRefzbMATHGoogle Scholar
  15. 15.
    Jonkers, H.B.M.: A Fast Garbage Compaction Algorithm. Information Processing Letters 9(9), 25–30 (1979)Google Scholar
  16. 16.
    Sansom, P.M.: Combining Single-Space and Two-Space Compacting Garbage Collectors. In: Proceedings of the Glasgow Workshop on Functional Programming (1991)Google Scholar
  17. 17.
    Wegiel, M., Krintz, C.: The mapping collector: virtual memory support for generational, parallel, and concurrent compaction. In: International Conference on Architectural Support for Programming Languages and Operating Systems, pp. 91–102 (2008)Google Scholar
  18. 18.
    Fisher, D.A.: Bounded Workspace Garbage Collection in an Address Order Preserving List Processing Environment. Information Processing Letters 3(1), 25–32 (1974)CrossRefzbMATHGoogle Scholar
  19. 19.
    Baecker, H.D.: Garbage Collection for Virtual Memory Computer Systems. Communications of the ACM 15(11), 981–986 (1972)CrossRefGoogle Scholar
  20. 20.
    Cohen, J., Nicolau, A.: Comparison of Compacting Algorithms for Garbage Collection. ACM Transactions on Programming Languages and Systems 5(4), 532–553 (1983)CrossRefGoogle Scholar
  21. 21.
    Ossia, Y., Yitzhak, O.B., Segal, M.: Mostly Concurrent Compaction for Mark-Sweep GC. In: International Symposium on Memory Management, pp. 25–36 (2004)Google Scholar
  22. 22.
    Printezis, T.: Hot-swapping between a mark&sweep and a mark&compact garbage collector in a generational environment. In: Symposium on JavaTM Virtual Machine Research and Technology Symposium, pp. 20–32 (2001)Google Scholar
  23. 23.
    Yu, Z.C.H., Lau, F.C.M., Wang, C.-L.: Exploiting Java Objects Behavior for Memory Management and Optimizations. In: Asian Symposium on Programming Language and Systems, pp. 437–452 (2004)Google Scholar
  24. 24.
    Hertz, M., Feng, Y., Berger, E.D.: Garbage collection without paging. In: ACM SIGPLAN Conference on Programming Language Design and Implementation, pp. 143–153 (2005)Google Scholar
  25. 25.
    Yang, T., Berger, E.D., Kaplan, S.F.: CRAMM: virtual memory support for garbage-collected applications. In: Symposium on Operating Systems Design and Implementation, pp. 103–116 (2006)Google Scholar
  26. 26.
    Wilson, P.R., Lam, M.S., Moher, T.G.: Effective ”Static-graph” Reorganization to Improve Locality in Garbage-Collected Systems. ACM SIGPLAN Notices 26(6), 177–191 (1991)CrossRefGoogle Scholar
  27. 27.
    Spoonhower, D., Blelloch, G., Harper, R.: Using Page Residency to Balance Tradeoffs in Tracing Garbage Collection. In: ACM/USENIX International Conference on Virtual Execution Environments, pp. 57–67 (2005)Google Scholar
  28. 28.
    Shuf, Y., Gupta, M., Bordawekar, R., Singh, J.R.: Exploiting Prolific Types for Memory Management and Optimizations. In: ACM Symposium on Principles of Programming Languages, pp. 295–306 (2002)Google Scholar
  29. 29.
    The Ubuntu Operating System,
  30. 30.
    The Java Hotspot Virtual Machine, White Paper,
  31. 31.
    The SPEC Java Virtual Machine Benchmarks,

Copyright information

© Springer-Verlag Berlin Heidelberg 2010

Authors and Affiliations

  • Liangliang Tong
    • 1
  • Francis C. M. Lau
    • 1
  1. 1.Department of Computer ScienceThe University of Hong KongHong Kong

Personalised recommendations