skip to main content
research-article

M3: high-performance memory management from off-the-shelf components

Published:12 June 2014Publication History
Skip Abstract Section

Abstract

Real-world garbage collectors in managed languages are complex. We investigate whether this complexity is really necessary and show that by having a different (but wider) interface between the collector and the developer, we can achieve high performance with off-the-shelf components for real applications. We propose to assemble a memory manager out of multiple, simple collection strategies and to expose the choice of where to use those strategies in the program to the developer. We describe and evaluate an instantiation of our design for C. Our prototype allows developers to choose on a per-type basis whether data should be reference counted or reclaimed by a tracing collector. While neither strategy is optimised, our empirical data shows that we can achieve performance that is competitive with hand-tuned C code for real-world applications.

References

  1. GNU C Library, 2.18.1. https://www.gnu.org/software/libc/, 2013.Google ScholarGoogle Scholar
  2. Memcached. http://memcached.org/, 2014.Google ScholarGoogle Scholar
  3. B. Atikoglu, Y. Xu, E. Frachtenberg, S. Jiang, and M. Paleczny. Workload Analysis of a Large-scale Key-value Store. In International Conference on Measurement and Modeling of Computer Systems, SIGMETRICS'12. ACM, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. C. R. Attanasio, D. F. Bacon, A. Cocchi, and S. Smith. A Comparative Evaluation of Parallel Garbage Collector Implementations. In Workshopon Languages and Compilers for Parallel Computing, LCPC'01, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. G. Attardi and T. Flagella. A Customizable Memory Management Framework. In USENIX C++ Conference, 1994. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. G. Attardi, T. Flagella, and P. Iglio. A Customisable Memory Management Framework for C++. In Software Practice and Experience, SPE'98, 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. D. F. Bacon, P. Cheng, and V. Rajan. A Unified Theory of Garbage Collection. In Object-Oriented Programming, Systems, Languages & Applications, OOPSLA'04. ACM SIGPLAN, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. E. D. Berger, B. G. Zorn, and K. S. McKinley. Composing High- Performance Memory Allocators. In Conference on Programming Language Design and Implementation, PLDI'01. ACM SIGPLAN, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. S. M. Blackburn and K. S. McKinley. Ulterior Reference Counting: Fast Garbage Collection without a LongWait. In Object-Oriented Programming, Systems, Languages & Applications, OOPSLA'03. ACM SIGPLAN, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. S. M. Blackburn, S. Singhai, M. Hertz, K. S. McKinely, and J. E. B. Moss. Pretenuring for Java. In Object-Oriented Programming, Systems, Languages & Applications, OOPSLA'01. ACM SIGPLAN, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. S. M. Blackburn, P. Cheng, and K. S. McKinley. Oil and Water? HighPerformance Garbage Collection in Java with JMTk. In InternationalConference on Software Engineering, ICSE'04. IEEE, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. S. M. Blackburn, M. Hertz, K. McKinley, J. E. B. Moss, and T. Yang. Profile-Based Pretenuring. In Transactions on Programming Languagesand Systems, TPLS'07. ACM SIGPLAN, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. S. M. Blackburn, K. S. McKinley, R. Garner, C. Hoffmann, A. M.Khan, R. Bentzur, A. Diwan, D. Feinberg, D. Frampton, S. Z. Guyer, M. Hirzel, A. Hosking, M. Jump, H. Lee, J. E. B. Moss, A. Phansalkar, D. Stefanovik, T. VanDrunen, D. von Dincklage, and B. Wiedermann. Wake Up and Smell the Coffee: Evaluation Methodology for the 21st Century. Commun. ACM, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. H. Boehm. Space Efficient Conservative Garbage Collection. In Conference on Programming Language Design and Implementation, PLDI'93. ACM SIGPLAN, 1993. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. H. Boehm and M. Weiser. Garbage Collection in an Uncooperative Environment. In Software Practice and Experience, SPE'88, 1988. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. H. Boehm, A. Demers, and S. Shenker. Mostly Parallel Garbage Collection. In Conference on Programming Language Design and Implementation, PLDI'91. ACM SIGPLAN, 1991. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. P. Cheng, R. Harper, and P. Lee. Generational Stack Collection and Profile-Driven Pretenuring. In Conference on Programming Language Design and Implementation, PLDI'98. ACM SIGPLAN, 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. J. R. Ellis and D. L. Detlefs. Safe, Efficient Garbage Collection for C++. In C++ Technical Conference, CTEC'94. USENIX, 1994. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. R. Fitzgerald and D. Tarditi. The Case for Profile-Directed Selection of Garbage Collectors. In International Symposium on Memory Management, ISMM'00. ACM SIGPLAN, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. D. Gay and A. Aiken. Memory Management with Explicit Regions. In Conference on Programming Language Design and Implementation, PLDI'98. ACM SIGPLAN, 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. D. Gay and A. Aiken. Language Support for Regions. In Conference on Programming Language Design and Implementation, PLDI'01. ACM SIGPLAN, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Google. The Go Programming Language. http://golang.org/, 2014.Google ScholarGoogle Scholar
  23. D. Grossman, G. Morrisett, T. Jim, M. Hicks, Y.Wang, and J. Cheney. Region-based Memory Management in Cyclone. In Conference on Programming Language Design and Implementation, PLDI'02. ACM SIGPLAN, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. R. L. Hudson, J. E. Moss, A. Diwan, and C. F. Weight. A Language- Independent Garbage Collector Toolkit. Technical report, Amherst, MA, USA, 1991. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. International Organization for Standards. Programming Language C++. ISO/IEC 14882:2011(E), 2011.Google ScholarGoogle Scholar
  26. T. Jim, G. Morrisett, D. Grossman, M. Hicks, J. Cheney, and Y.Wang. Cyclone: A Safe Dialect of C. In USENIX Annual Technical Conference, ATC'02. USENIX, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. M. Jump, S. M. Blackburn, and K. S. McKinley. Dynamic Object Sampling for Pretenuring. In International Symposium on Memory Management, ISMM'04. ACM SIGPLAN, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. Mozilla. The Rust Programming Language. http://www.rust-lang.org/, 2014.Google ScholarGoogle Scholar
  29. P. Reames and G. Necula. Towards Hinted Collection. In International Symposium on Memory Management, ISMM'13. ACM SIGPLAN, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. S. Schleimer, D. S. Wilkerson, and A. Aiken. Winnowing: Local Algorithms for Document Fingerprinting. In International Conference on Management of Data, COMAD'03. ACM SIGMOD, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. R. Shahriyar, S. M. Blackburn, X. Yang, and K. S. McKinley. Taking Off the Gloves with Reference Counting Immix. In Object- Oriented Programming, Systems, Languages & Applications, OOPSLA'13. ACM SIGPLAN, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. S. Soman, C. Krintz, and D. F. Bacon. Dynamic Selection of Application-Specific Garbage Collectors. In International Symposium on Memory Management, ISMM'04. ACM SIGPLAN, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. K.-P. Vo. Vmalloc: A General and Efficient Memory Allocator. Software Practice and Experience, v26:1--18, 1996.Google ScholarGoogle Scholar

Index Terms

  1. M3: high-performance memory management from off-the-shelf components

    Recommendations

    Comments

    Login options

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

    Sign in

    Full Access

    • Published in

      cover image ACM SIGPLAN Notices
      ACM SIGPLAN Notices  Volume 49, Issue 11
      ISMM '14
      November 2014
      121 pages
      ISSN:0362-1340
      EISSN:1558-1160
      DOI:10.1145/2775049
      • Editor:
      • Andy Gill
      Issue’s Table of Contents
      • cover image ACM Conferences
        ISMM '14: Proceedings of the 2014 international symposium on Memory management
        June 2014
        136 pages
        ISBN:9781450329217
        DOI:10.1145/2602988

      Copyright © 2014 ACM

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      • Published: 12 June 2014

      Check for updates

      Qualifiers

      • research-article
    • Article Metrics

      • Downloads (Last 12 months)4
      • Downloads (Last 6 weeks)3

      Other Metrics

    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!