ACM Home Page
Please provide us with feedback. Feedback
Reconsidering custom memory allocation
Full text PdfPdf (345 KB)
Source Conference on Object Oriented Programming Systems Languages and Applications archive
Proceedings of the 17th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications table of contents
Seattle, Washington, USA
SESSION: Storage Management table of contents
Pages: 1 - 12  
Year of Publication: 2002
ISBN:1-58113-471-1
Also published in ...
Authors
Emery D. Berger  University of Massachusetts, Amherst, MA
Benjamin G. Zorn  Microsoft Research, Redmond, WA
Kathryn S. McKinley  The University of Texas at Austin, Austin, TX
Sponsors
ACM: Association for Computing Machinery
SIGPLAN: ACM Special Interest Group on Programming Languages
Publisher
ACM  New York, NY, USA
Bibliometrics
Downloads (6 Weeks): 12,   Downloads (12 Months): 144,   Citation Count: 26
Additional Information:

abstract   references   cited by   index terms   collaborative colleagues  

Tools and Actions: Request Permissions Request Permissions    Review this Article  
DOI Bookmark: Use this link to bookmark this Article: http://doi.acm.org/10.1145/582419.582421
What is a DOI?

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.


REFERENCES

Note: OCR errors may be found in this Reference List extracted from the full text article. ACM has opted to expose the complete List rather than only correct and linked references.

 
1
Apache Foundation. Apache Web server. http://www.apache.org.
 
2
3
4
 
5
6
 
7
Dov Bulka and David Mayhew. Efficient C++. Addison-Wesley, 2001.
8
9
 
10
 
11
Boris Fomitchev. STLport. http://www.stlport.org/.
 
12
 
13
Free Software Foundation. GCC Home Page. http://gcc.gnu.org/.
14
15
 
16
Wolfram Gloger. Dynamic memory allocator implementations in Linux system libraries. http://www.dent.med.uni-muenchen.de/~wmglo/malloc-slides.html.
17
 
18
Sam Guyer, Daniel A. Jiménez, and Calvin Lin. The C-Breeze compiler infrastructure. Technical Report UTCS-TR01-43, The University of Texas at Austin, November 2001.
 
19
 
20
David R. Hanson. C Interfaces and Implementation. Addison-Wesley, 1997.
 
21
Reed Hastings and Bob Joyce. Purify: Fast detection of memory leaks and access errors. In Proceedings of the Winter USENIX 1992 Conference, pages 125--136, December 1992.
22
 
23
Doug Lea. A memory allocator. http://g.oswego.edu/dl/html/malloc.html.
 
24
 
25
 
26
Bartosz Milewski. C++ In Action: Industrial-Strength Programming Techniques. Addison-Wesley, 2001.
 
27
Philip A. Nelson. bc - An arbitrary precision calculator language. http://www.gnu.org/software/bc/bc.html.
 
28
29
30
 
31
Colin Runciman and Niklas Rojemo. Lag, drag and postmortem heap profiling. In Implementation of Functional Languages Workshop, Bastad, Sweden, September 1995.
 
32
SGI. The Standard Template Library for C++: Allocators. http://www.sgi.com/tech/stl/Allocators.html.
33
 
34
Standard Performance Evaluation Corporation. SPEC2000. http://www.spec.org.
 
35
Standard Performance Evaluation Corporation. SPEC95. http://www.spec.org.
 
36
 
37
 
38
Suzanne Pierce. PPRC: Microsoft's Tool Box. http://research.microsoft.com/research/pprc/mstoolbox.asp.
 
39
 
40
 
41
Kiem-Phong Vo. Vmalloc: A general and efficient memory allocator. In Software Practice & Experience, number 26, pages 1--18. Wiley, 1996.
42
 
43
 
44

CITED BY  26

Collaborative Colleagues:
Emery D. Berger: colleagues
Benjamin G. Zorn: colleagues
Kathryn S. McKinley: colleagues