Title
OOPSLA 2002: Reconsidering custom memory allocation
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.
Year
DOI
Venue
2013
10.1145/2502508.2502522
SIGPLAN Notices
Keywords
Field
DocType
high performance,custom memory allocators,reconsidering custom memory allocation,memory consumption,custom allocators,performance improvement,use custom allocators,lea allocator,region-based allocators,memory leak,higher performance
Programmer,Programming language,Computer science,Heap (data structure),Memory management,Allocator,Software quality,Memory leak,Semantics
Journal
Volume
Issue
ISSN
48
4S
0362-1340
Citations 
PageRank 
References 
4
0.45
12
Authors
3
Name
Order
Citations
PageRank
Emery D. Berger1104855.87
Benjamin G. Zorn21119128.20
Kathryn S. Mckinley33746267.74