Reconsidering custom memory allocation

Author:

Berger Emery D.1,Zorn Benjamin G.2,McKinley Kathryn S.3

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

同舟云学术

1.学者识别学者识别

2.学术分析学术分析

3.人才评估人才评估

"同舟云学术"是以全球学者为主线,采集、加工和组织学术论文而形成的新型学术文献查询和分析系统,可以对全球学者进行文献检索和人才价值评估。用户可以通过关注某些学科领域的顶尖人物而持续追踪该领域的学科进展和研究前沿。经过近期的数据扩容,当前同舟云学术共收录了国内外主流学术期刊6万余种,收集的期刊论文及会议论文总量共计约1.5亿篇,并以每天添加12000余篇中外论文的速度递增。我们也可以为用户提供个性化、定制化的学者数据。欢迎来电咨询!咨询电话:010-8811{复制后删除}0370

www.globalauthorid.com

TOP

Copyright © 2019-2024 北京同舟云网络信息技术有限公司
京公网安备11010802033243号  京ICP备18003416号-3