10.1145/964001.964019acmconferencesArticle/Chapter ViewAbstractPublication PagespoplConference Proceedingsconference-collections
Article

The space cost of lazy reference counting

Published:01 January 2004Publication History

ABSTRACT

Reference counting memory management is often advocated as a technique for reducing or avoiding the pauses associated with tracing garbage collection. We present some measurements to remind the reader that classic reference count implementations may in fact exhibit longer pauses than tracing collectors.We then analyze reference counting with lazy deletion, the standard technique for avoiding long pauses by deferring deletions and associated reference count decrements, usually to allocation time. Our principal result is that if each reference count operation is constrained to take constant time, then the overall space requirements can be increased by a factor of Ω(R) in the worst case, where R is the ratio between the size of the largest and smallest allocated object. This bound is achievable, but probably large enough to render this design point useless for most real-time applications.We show that this space cost can largely be avoided if allocating an $n$ byte object is allowed to additionally perform O(n) reference counting work.

References

  1. D. F. Bacon, C. R. Attanasio, H. B. Lee, V. T. Rajan, and S. Smith. Java without the coffee breaks: A nonintrusive multiprocessor garbage collector. In Proceedings of the ACM SIGPLAN '01 Conference on Programming Language Design and Implementation, pages 92--103. ACM, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. D. F. Bacon, P. Cheng, and V. T. Rajan. A realtime garbage collector with low overhead and consistent utilization. In Conference Record of the Thirtieth Annual ACM Symposium on Principles of Programming Languages, pages 285--298, January 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. D. F. Bacon and V. T. Rajan. Concurrent cycle collection in reference counted systems. In Proceedings of the Fifteenth European Conference on Object-Oriented Programming, LNCS 2072, pages 207--235. Springer, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. H. Baker. List processing in real time on a serial computer. Communications of the ACM, pages 280--294, April 1978. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. H.-J. Boehm. A garbage collector for C and C++. http://www.hpl.hp.com/personal/Hans_Boehm/gc/.Google ScholarGoogle Scholar
  6. H.-J. Boehm. Fast multiprocessor memory allocation and garbage collection. Technical Report HPL-2000-165, HP Laboratories, December 2000.Google ScholarGoogle Scholar
  7. H.-J. Boehm. Reducing garbage collector cache misses. In Proceedings of the 2000 International Symposium on Memory Management, pages 59--64, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. G. E. Collins. A method for overlapping and erasure of lists. CACM, 13(12):655--657, December 1960. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. G. Colvin, B. Dawes, P. Dimov, and D. Adler. Boost smart pointer library. http://www.boost.org/libs/smart_ptr/.Google ScholarGoogle Scholar
  10. J. DeTreville. Experience with concurrent garbage collectors for modula-2+. Technical Report~64, Digital Systems Research Center, August 1990.Google ScholarGoogle Scholar
  11. L. P. Deutsch and D. G. Bobrow. An efficient incremental automatic garbage collector. Communications of the ACM, 19(9):522--526, September 1976. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. S. Dieckman and U. Hölzle. A study of the allocation behavior of the SPECjvm98 Java benchmarks. Technical Report TRCS98-33, University of California at Santa Barbara, December 1998. Google ScholarGoogle Scholar
  13. M. S. Johnstone and P. R. Wilson. The memory fragmentation problem: solved? In Proceedings of the International Symposium on Memory Management 1998, pages 26--36, October 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. R. Jones and R. Lins. Garbage Collection. John Wiley and Sons, 1996.Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Y. Levanoni and E. Petrank. An on-the-fly reference counting garbage collector for Java. In Conference on Object-Oriented Programming Systems and Languages (OOPSLA), pages 367--380, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. T. Ritzau. Memory Efficient Hard Real-Time Garbage Collection. PhD thesis, Department of Computer and InformationScience, Linköping University, April 2003.Google ScholarGoogle Scholar
  17. S. G. Robertz and R. Henriksson. Time triggered garbage collection. In LCTES '03, pages 93--102. ACM, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. J. M. Robson. An estimate of the store size necessary for dynamic storage allocation. Journal of the ACM, 18(3):416--423, 1971. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. J. M. Robson. Bounds for some functions concerning dynamic storage allocation. Journal of the ACM, 21(3):491--499, 1974. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. D. J. Roth and D. S. Wise. One bit counts between unique and sticky. In Proceedings of the International Symposium on Memory Management 1998, pages 49--56, October 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. F. Siebert and A. Walter. Deterministic execution of Java's primitive bytecode operations. In Java Virtual Machine Research and Technology Symposium, April 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. W. R. Stoye, T. J. W. Clarke, and A. C. Norman. Some practical methods for rapid combinator reduction. In Conference on Lisp and Functional Programming, pages 159--166, 1984. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. J. Weizenbaum. Symmetric list processor. Communications of the ACM, 6(9):524--544, 1963. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. D. S. Wise, B. Heck, C. Hess, W. Hunt, and E. Ost. Research demonstration of a hardware reference-counting heap. LISP Symb. Computat., 10(2):159--181, July 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. The space cost of lazy reference counting

    Comments

    Login options

    Check if you have access through your login credentials or your institution to get full access on this article.

    Sign in
    • Published in

      cover image ACM Conferences
      POPL '04: Proceedings of the 31st ACM SIGPLAN-SIGACT symposium on Principles of programming languages
      January 2004
      364 pages
      ISBN:158113729X
      DOI:10.1145/964001
      • cover image ACM SIGPLAN Notices
        ACM SIGPLAN Notices  Volume 39, Issue 1
        POPL '04
        January 2004
        352 pages
        ISSN:0362-1340
        EISSN:1558-1160
        DOI:10.1145/982962
        Issue’s Table of Contents

      Copyright © 2004 ACM

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      • Published: 1 January 2004

      Permissions

      Request permissions about this article.

      Request Permissions

      Check for updates

      Qualifiers

      • Article

      Acceptance Rates

      POPL '04 Paper Acceptance Rate 29 of 176 submissions, 16%Overall Acceptance Rate 770 of 3,892 submissions, 20%

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader
    About Cookies On This Site

    We use cookies to ensure that we give you the best experience on our website.

    Learn more

    Got it!