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.
- GNU C Library, 2.18.1. https://www.gnu.org/software/libc/, 2013.Google Scholar
- Memcached. http://memcached.org/, 2014.Google Scholar
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- G. Attardi and T. Flagella. A Customizable Memory Management Framework. In USENIX C++ Conference, 1994. Google Scholar
Digital Library
- G. Attardi, T. Flagella, and P. Iglio. A Customisable Memory Management Framework for C++. In Software Practice and Experience, SPE'98, 1998. Google Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- H. Boehm. Space Efficient Conservative Garbage Collection. In Conference on Programming Language Design and Implementation, PLDI'93. ACM SIGPLAN, 1993. Google Scholar
Digital Library
- H. Boehm and M. Weiser. Garbage Collection in an Uncooperative Environment. In Software Practice and Experience, SPE'88, 1988. Google Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- J. R. Ellis and D. L. Detlefs. Safe, Efficient Garbage Collection for C++. In C++ Technical Conference, CTEC'94. USENIX, 1994. Google Scholar
Digital Library
- 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 Scholar
Digital Library
- D. Gay and A. Aiken. Memory Management with Explicit Regions. In Conference on Programming Language Design and Implementation, PLDI'98. ACM SIGPLAN, 1998. Google Scholar
Digital Library
- D. Gay and A. Aiken. Language Support for Regions. In Conference on Programming Language Design and Implementation, PLDI'01. ACM SIGPLAN, 2001. Google Scholar
Digital Library
- Google. The Go Programming Language. http://golang.org/, 2014.Google Scholar
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- International Organization for Standards. Programming Language C++. ISO/IEC 14882:2011(E), 2011.Google Scholar
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- Mozilla. The Rust Programming Language. http://www.rust-lang.org/, 2014.Google Scholar
- P. Reames and G. Necula. Towards Hinted Collection. In International Symposium on Memory Management, ISMM'13. ACM SIGPLAN, 2013. Google Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- K.-P. Vo. Vmalloc: A General and Efficient Memory Allocator. Software Practice and Experience, v26:1--18, 1996.Google Scholar
Index Terms
M3: high-performance memory management from off-the-shelf components
Recommendations
M3: high-performance memory management from off-the-shelf components
ISMM '14: Proceedings of the 2014 international symposium on Memory managementReal-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 ...
Myths and realities: the performance impact of garbage collection
SIGMETRICS '04/Performance '04: Proceedings of the joint international conference on Measurement and modeling of computer systemsThis paper explores and quantifies garbage collection behavior for three whole heap collectors and generational counterparts: copying semi-space, mark-sweep, and reference counting, the canonical algorithms from which essentially all other collection ...
Myths and realities: the performance impact of garbage collection
This paper explores and quantifies garbage collection behavior for three whole heap collectors and generational counterparts: copying semi-space, mark-sweep, and reference counting, the canonical algorithms from which essentially all other collection ...







Comments