Affiliation:
1. University of Massachusetts, Amherst, MA
2. Microsoft Research, Redmond, WA
3. The University of Texas at Austin, Austin, TX
Abstract
Programmers hoping to achieve performance improvements often use custom memory allocators. This in-depth study examines eight applications that use custom allocators. Surprisingly, for six of these applications, a state-of-the-art general-purpose allocator (the Lea allocator) performs as well as or better than the custom allocators. The two exceptions use regions, which deliver higher performance (improvements of up to 44%). Regions also reduce programmer burden and eliminate a source of memory leaks. However, we show that the inability of programmers to free individual objects within regions can lead to a substantial increase in memory consumption. Worse, this limitation precludes the use of regions for common programming idioms, reducing their usefulness.We present a generalization of general-purpose and region-based allocators that we call
reaps
. Reaps are a combination of regions and heaps, providing a full range of region semantics with the addition of individual object deletion. We show that our implementation of reaps provides high performance, outperforming other allocators with region-like semantics. We then use a case study to demonstrate the space advantages and software engineering benefits of reaps in practice. Our results indicate that programmers needing fast regions should use reaps, and that most programmers considering custom allocators should instead use the Lea allocator.
Publisher
Association for Computing Machinery (ACM)
Subject
Computer Graphics and Computer-Aided Design,Software
Reference43 articles.
1. Apache Foundation. Apache Web server. http://www.apache.org. Apache Foundation. Apache Web server. http://www.apache.org.
2. Hoard
3. Composing high-performance memory allocators
Cited by
38 articles.
订阅此论文施引文献
订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献
1. Beyond RSS: Towards Intelligent Dynamic Memory Management (Work in Progress);Proceedings of the 20th ACM SIGPLAN International Conference on Managed Programming Languages and Runtimes;2023-10-19
2. The Unexpected Efficiency of Bin Packing Algorithms for Dynamic Storage Allocation in the Wild: An Intellectual Abstract;Proceedings of the 2023 ACM SIGPLAN International Symposium on Memory Management;2023-06-06
3. There Ain’t No Such Thing as a Free Custom Memory Allocator;2022 IEEE International Conference on Software Maintenance and Evolution (ICSME);2022-10
4. Software Hint-Driven Data Management for Hybrid Memory in Mobile Systems;ACM Transactions on Embedded Computing Systems;2022-01-14
5. OpenMem: Hardware/Software Cooperative Management for Mobile Memory System;2021 58th ACM/IEEE Design Automation Conference (DAC);2021-12-05