|
ABSTRACT
Dynamic memory allocators affect an application's performance through their data layout quality. They can use an application's allocation hints to improve the spatial locality of this layout. However, a practical approach needs to be automatic, without user intervention. In this paper we present two locality improving allocators, that use allocation hints provided automatically from the C++ STL library to improve an application's spatial locality. When compared to state-of-the-art allocators on seven real world applications, our allocators run on average 7% faster than the Lea allocator, and 17% faster than the FreeBSD's allocator, with the same memory fragmentation as the Lea allocator, one of the best allocators. While considering locality as an important goal, locality improving allocators must not abandon the existing constraints of fast allocation speed and low fragmentation. These constraints further challenge their design and implementation. We experimentally show that within a memory allocator, allocation speed, memory fragmentation, and spatial locality compete with each other in a game of rock, paper, scissors: when one tries to improve one trait, the others suffer. We conclude that our allocators achieve a good balance of these traits, and they can easily be adjusted to optimize the most important trait for each application.
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
|
International Standard ISO/IEC 14882. Programming Languages -- C++. First edition, 1998.
|
 |
2
|
|
 |
3
|
|
 |
4
|
Emery D. Berger , Benjamin G. Zorn , Kathryn S. McKinley, Reconsidering custom memory allocation, Proceedings of the 17th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications, November 04-08, 2002, Seattle, Washington, USA
|
| |
5
|
S. Borkar, P. Dubey, K. Kahn, D. Kuck, H. Mulder, S. Pawlowski, and J. Rattner. Platform 2015: Intel Processor and Platform Evolution for the Next Decade. Technology@Intel Magazine, March, 2005.
|
 |
6
|
Brad Calder , Chandra Krintz , Simmi John , Todd Austin, Cache-conscious data placement, Proceedings of the eighth international conference on Architectural support for programming languages and operating systems, p.139-149, October 02-07, 1998, San Jose, California, United States
|
 |
7
|
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
|
 |
8
|
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
|
 |
9
|
|
 |
10
|
|
| |
11
|
|
 |
12
|
Dirk Grunwald , Benjamin Zorn , Robert Henderson, Improving the cache locality of memory allocation, Proceedings of the ACM SIGPLAN 1993 conference on Programming language design and implementation, p.177-186, June 21-25, 1993, Albuquerque, New Mexico, United States
|
| |
13
|
J. Hallberg, T. Palm, and M. Brorsson. Cache-Conscious Allocation of Pointer-Based Data Structures Revisited with HW/SW Prefetching, 2003.
|
 |
14
|
|
 |
15
|
|
| |
16
|
Standard Performance Evaluation Corporation - SPEC - CPU2006. http://www.spec.org/cpu2006.
|
 |
17
|
Xianglong Huang , Stephen M. Blackburn , Kathryn S. McKinley , J Eliot B. Moss , Zhenlin Wang , Perry Cheng, The garbage collection advantage: improving program locality, Proceedings of the 19th annual ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications, October 24-28, 2004, Vancouver, BC, Canada
|
 |
18
|
|
| |
19
|
A. Jula and L. Rauchwerger. Custom Memory Allocation for Free. In The 19th Workshop on Languages and Compilers for Parallel Computing, New Orleans, Louisiana, USA, 2006. Springer-Verlag Lecture Notes in Computer Science.
|
| |
20
|
Alin Jula. Improving Locality with Dynamic Memory Allocation. PhD thesis, Texas A&M University, College Station, TX, 2008.
|
| |
21
|
|
 |
22
|
|
 |
23
|
|
| |
24
|
|
 |
25
|
|
| |
26
|
Doug Lea. A memory allocator. The C++ Report, 1989.
|
| |
27
|
P.W. Purdom, S. M. Stigler, and T. Cheam. Statistical Investigation of Three Storage Allocation Algorithms. Technical Report 98, Computer Science, University of Wisconsin - Madison, 1970.
|
 |
28
|
Yefim Shuf , Manish Gupta , Hubertus Franke , Andrew Appel , Jaswinder Pal Singh, Creating and preserving locality of java applications at allocation and garbage collection times, Proceedings of the 17th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications, November 04-08, 2002, Seattle, Washington, USA
|
 |
29
|
|
| |
30
|
|
| |
31
|
K. Vo. Vmalloc: A general and efficient memory allocator. Software Practice and Experience, pages 357--374, 1996. 26(3).
|
 |
32
|
|
| |
33
|
|
 |
34
|
|
|