|
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
|
Emery D. Berger , Kathryn S. McKinley , Robert D. Blumofe , Paul R. Wilson, Hoard: a scalable memory allocator for multithreaded applications, Proceedings of the ninth international conference on Architectural support for programming languages and operating systems, p.117-128, November 2000, Cambridge, Massachusetts, United States
|
 |
4
|
|
| |
5
|
|
 |
6
|
|
| |
7
|
Dov Bulka and David Mayhew. Efficient C++. Addison-Wesley, 2001.
|
 |
8
|
|
 |
9
|
Trishul M. Chilimbi , Mark D. Hill , James R. Larus, Cache-conscious structure layout, Proceedings of the ACM SIGPLAN 1999 conference on Programming language design and implementation, p.1-12, May 01-04, 1999, Atlanta, Georgia, United States
|
| |
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
|
Dan Grossman , Greg Morrisett , Trevor Jim , Michael Hicks , Yanling Wang , James Cheney, Region-based memory management in cyclone, Proceedings of the ACM SIGPLAN 2002 Conference on Programming language design and implementation, June 17-19, 2002, Berlin, Germany
|
| |
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
|
|
|
|
|
Chen Ding , Chengliang Zhang , Xipeng Shen , Mitsunori Ogihara, Gated memory control for memory monitoring, leak detection and garbage collection, Proceedings of the 2005 workshop on Memory system performance, June 12-12, 2005, Chicago, Illinois
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
A. M. Cheadle , A. J. Field , J. W. Ayres , N. Dunn , R. A. Hayden , J. Nystrom-Persson, Visualising dynamic memory allocators, Proceedings of the 2006 international symposium on Memory management, June 10-11, 2006, Ottawa, Ontario, Canada
|
|
|
|
|
|
|
|
|
|
|
|
Wentong Li , Mehran Rezaei , Krishna Kavi , Afrin Naz , Philip Sweany, Feasibility of decoupling memory management from the execution pipeline, Journal of Systems Architecture: the EUROMICRO Journal, v.53 n.12, p.927-936, December, 2007
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|