Skip to main content

Custom Memory Allocation for Free

  • Conference paper
Languages and Compilers for Parallel Computing (LCPC 2006)

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 4382))

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.

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Barret, D., Zorn, B.: Using Lifetime Predictors to Improve Memory Allocation Performance. In: ACM SIGPLAN PLDI, Albuquerque, NM, ACM Press, New York (1993)

    Google Scholar 

  2. Berger, E., Zorn, B., McKinley, K.: Reconsidering Custom Memory Allocation. In: ACM OOPSLA, Seattle, WA, ACM Press, New York (2002)

    Google Scholar 

  3. Berger, E., Zorn, B., McKinley, K.: Composing High-Performance Memory Allocators. In: ACM SIGPLAN PLDI, Snowbird, UT, ACM Press, New York (2001)

    Google Scholar 

  4. Calder, B., et al.: Cache-Conscious Data Placement. In: ACM ASPLOS, San Jose, CA, ACM Press, New York (1998)

    Google Scholar 

  5. Chilimbi, T., Davidson, B., Larus, J.: Cache-conscious structure definition. In: ACM SIGPLAN PLDI, Atlanta, GA, ACM Press, New York (1999)

    Google Scholar 

  6. Chilimbi, T., Hill, M., Larus, J.: Cache-conscious structure layout. In: ACM SIGPLAN PLDI, Atlanta, GA, ACM Press, New York (1999)

    Google Scholar 

  7. 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)

    Google Scholar 

  8. Gay, D., Aiken, A.: Memory Management with Explicit Regions. In: ACM SIGPLAN PLDI, Montreal, Canada, ACM Press, New York (1998)

    Google Scholar 

  9. 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)

    Google Scholar 

  10. Grunwald, D., Zorn, B., Henderson, R.: Improving the Cache Locality of Memory Allocation. In: ACM SIGPLAN PLDI, Albuquerque, NM, ACM Press, New York (1993)

    Google Scholar 

  11. Huang, X., et al.: The garbage collection advantage: improving program locality. In: ACM OOPSLA, Vancouver, BC, Canada, ACM Press, New York (2004)

    Google Scholar 

  12. International Standard ISO/IEC 14882. Programming Languages C++, 1st edn. (1998)

    Google Scholar 

  13. 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)

    Google Scholar 

  14. Lea, D.: Some storage management techniques for container classes. The C++ Report (1990), http://g.oswego.edu/pub/papers/C++Report89.txt

  15. Lea, D.: A memory allocator. Unix/Mail, Hanser Verlag (1996), http://gee.cs.oswego.edu/dl/html/malloc.html

  16. Seidl, M., Zorn, B.: Segregating Heap Objects by Reference Behavior and Lifetime. In: ACM SIGPLAN PLDI, San Jose, CA, ACM Press, New York (1998)

    Google Scholar 

  17. SGI: SGI STL Allocator Design. http://www.sgi.com/tech/stl/alloc.html

  18. 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)

    Google Scholar 

  19. Standish, T.: Data Structures Techniques. Addison-Wesley Press, Reading (1980)

    Google Scholar 

  20. Tofte, M., Talpin, J.: Region-Based Memory Management. In: Symposium on Principles of Programming Languages, Portland, OR (1994)

    Google Scholar 

  21. 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)

    Google Scholar 

  22. Blume, W., et al.: Advanced Program Restructuring for High-Performance Computers with Polaris. IEEE Computer 2912, 78–82 (1996)

    Google Scholar 

  23. Vo, K.: Vmalloc: A General and Efficient Memory Allocator. Software Practice Experience 263, 357–374 (1996)

    Article  Google Scholar 

  24. Weinstock, C.: Dynamic Storage Allocation Techniques. Doctoral dissertation, Carnegie-Mellon University, Pittsburgh (April 1976)

    Google Scholar 

  25. Wilson, P., et al.: Dynamic storage allocation: A survey and critical review. In: Int. Workshop on Memory Management, Kinross, UK (1995)

    Google Scholar 

  26. Wolf, M., Lam, M.: A Data Locality Optimizing Algorithm. In: ACM SIGPLAN PLDI, Toronto, Canada, ACM Press, New York (1991)

    Google Scholar 

  27. Wolfe, M.: Iteration Space Tiling for Memory Hierarchies. In: SIAM Conf. on Parallel Processing for Scientific Computing, Los Angeles, CA (1987)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

George Almási Călin Caşcaval Peng Wu

Rights and permissions

Reprints 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)

Publish with us

Policies and ethics