Abstract
We present a novel and efficient container-centric memory allocator, named Defero, which allows a container to guide the allocation of its elements. The guidance is supported by the semantic-rich context of containers in which a new element is inserted. Defero allocates based on two attributes: size and location. Our policy of allocating a new object close to a related object often results in significantly increased memory reference locality. Defero has been integrated to work seamlessly with the C++ Standard Template Library (STL) containers. The communication between containers and the memory allocator is very simple and insures portability. STL container modification is the only needed code change to achieve custom memory allocation. We present experimental results that show the performance improvements that can be obtained by using Defero as a custom allocator for STL applications. We have applied our memory allocator to the molecular dynamics and compiler applications and obtained significant performance improvements over using the standard GNU STL allocator. With our approach custom memory allocation has been achieved without any modification of the actual applications, i.e., without additional programming efforts.
Keywords
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.
This research supported in part by NSF Grants EIA-0103742, ACR-0081510, ACR-0113971, CCR-0113974, EIA-9810937, ACI-0326350, and by the DOE Office of Science.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Barret, D., Zorn, B.: Using Lifetime Predictors to Improve Memory Allocation Performance. In: ACM SIGPLAN PLDI, Albuquerque, NM, ACM Press, New York (1993)
Berger, E., Zorn, B., McKinley, K.: Reconsidering Custom Memory Allocation. In: ACM OOPSLA, Seattle, WA, ACM Press, New York (2002)
Berger, E., Zorn, B., McKinley, K.: Composing High-Performance Memory Allocators. In: ACM SIGPLAN PLDI, Snowbird, UT, ACM Press, New York (2001)
Calder, B., et al.: Cache-Conscious Data Placement. In: ACM ASPLOS, San Jose, CA, ACM Press, New York (1998)
Chilimbi, T., Davidson, B., Larus, J.: Cache-conscious structure definition. In: ACM SIGPLAN PLDI, Atlanta, GA, ACM Press, New York (1999)
Chilimbi, T., Hill, M., Larus, J.: Cache-conscious structure layout. In: ACM SIGPLAN PLDI, Atlanta, GA, ACM Press, New York (1999)
Ding, C., Kennedy, K.: Improving cache performance in dynamic applications through data and computation reorganization at run time. In: ACM SIGPLAN PLDI, Atlanta, GA, ACM Press, New York (1999)
Gay, D., Aiken, A.: Memory Management with Explicit Regions. In: ACM SIGPLAN PLDI, Montreal, Canada, ACM Press, New York (1998)
Grunwald, D., Zorn, B.: CustoMalloc: Efficient Synthesized Memory Allocators. Technical Report CU-CS-602-92, Dept. of Computer Science, Univ. of Colorado, Boulder, CO (1992)
Grunwald, D., Zorn, B., Henderson, R.: Improving the Cache Locality of Memory Allocation. In: ACM SIGPLAN PLDI, Albuquerque, NM, ACM Press, New York (1993)
Huang, X., et al.: The garbage collection advantage: improving program locality. In: ACM OOPSLA, Vancouver, BC, Canada, ACM Press, New York (2004)
International Standard ISO/IEC 14882. Programming Languages C++, 1st edn. (1998)
Lattner, C., Adve, V.: Automatic Pool Allocation: improving performance by controlling Data Structure Layout in the Heap. In: ACM SIGPLAN PLDI, Chicago, IL, ACM Press, New York (2005)
Lea, D.: Some storage management techniques for container classes. The C++ Report (1990), http://g.oswego.edu/pub/papers/C++Report89.txt
Lea, D.: A memory allocator. Unix/Mail, Hanser Verlag (1996), http://gee.cs.oswego.edu/dl/html/malloc.html
Seidl, M., Zorn, B.: Segregating Heap Objects by Reference Behavior and Lifetime. In: ACM SIGPLAN PLDI, San Jose, CA, ACM Press, New York (1998)
SGI: SGI STL Allocator Design. http://www.sgi.com/tech/stl/alloc.html
Shuf, Y., et al.: Creating and Preserving Locality of Java Applications at Allocation and Garbage Collection Times. In: ACM OOPSLA, Seattle, WA, ACM Press, New York (2002)
Standish, T.: Data Structures Techniques. Addison-Wesley Press, Reading (1980)
Tofte, M., Talpin, J.: Region-Based Memory Management. In: Symposium on Principles of Programming Languages, Portland, OR (1994)
Truong, D., Bodin, F., Seznec, A.: Improving cache behavior of dynamically allocated data structures. In: Int. C. on Parallel Architectures and Compilation Techniques, Paris (1998)
Blume, W., et al.: Advanced Program Restructuring for High-Performance Computers with Polaris. IEEE Computer 2912, 78–82 (1996)
Vo, K.: Vmalloc: A General and Efficient Memory Allocator. Software Practice Experience 263, 357–374 (1996)
Weinstock, C.: Dynamic Storage Allocation Techniques. Doctoral dissertation, Carnegie-Mellon University, Pittsburgh (April 1976)
Wilson, P., et al.: Dynamic storage allocation: A survey and critical review. In: Int. Workshop on Memory Management, Kinross, UK (1995)
Wolf, M., Lam, M.: A Data Locality Optimizing Algorithm. In: ACM SIGPLAN PLDI, Toronto, Canada, ACM Press, New York (1991)
Wolfe, M.: Iteration Space Tiling for Memory Hierarchies. In: SIAM Conf. on Parallel Processing for Scientific Computing, Los Angeles, CA (1987)
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 2007 Springer Berlin Heidelberg
About this paper
Cite this paper
Jula, A., Rauchwerger, L. (2007). Custom Memory Allocation for Free. In: Almási, G., Caşcaval, C., Wu, P. (eds) Languages and Compilers for Parallel Computing. LCPC 2006. Lecture Notes in Computer Science, vol 4382. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-72521-3_22
Download citation
DOI: https://doi.org/10.1007/978-3-540-72521-3_22
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-72520-6
Online ISBN: 978-3-540-72521-3
eBook Packages: Computer ScienceComputer Science (R0)