Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.1145/1542431.1542447acmconferencesArticle/Chapter ViewAbstractPublication PagesismmConference Proceedingsconference-collections
research-article

Two memory allocators that use hints to improve locality

Published: 19 June 2009 Publication History
  • Get Citation Alerts
  • 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

    [1]
    International Standard ISO/IEC 14882. Programming Languages -- C++. First edition, 1998.
    [2]
    A. Aggarwal. Software caching vs. prefetching. In ISMM, pages 157--162, New York, NY, USA, 2002. ACM Press.
    [3]
    E. D. Berger, B. G. Zorn, and K. S. McKinley. Composing high performance memory allocators. In PLDI, pages 114--124, New York, NY, USA, 2001. ACM Press.
    [4]
    E. D. Berger, B. G. Zorn, and K. S. McKinley. Reconsidering custom memory allocation. In OOPSLA, pages 1--12, New York, NY, USA, 2002. ACM Press.
    [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]
    B. Calder, C. Krintz, S. John, and T. Austin. Cache-conscious data placement. In ASPLOS-VIII, pages 139--149, New York, NY, USA, 1998. ACM Press.
    [7]
    T. M. Chilimbi, M. D. Hill, and J. R. Larus. Cache-conscious structure layout. In PLDI, pages 1--12, New York, NY, USA, 1999. ACM Press.
    [8]
    T. M. Chilimbi, M. D. Hill, and J. R. Larus. Cache-conscious structure layout. In PLDI, pages 1--12, New York, NY, USA, 1999. ACM Press.
    [9]
    Y. Feng and E. D. Berger. A locality-improving dynamic memory allocator. In Workshop on Memory System Performance, pages 68--77, New York, NY, USA, 2005. ACM Press.
    [10]
    D. Gay and A. Aiken. Memory management with explicit regions. In PLDI, pages 313--323, New York, NY, USA, 1998. ACM Press.
    [11]
    D. Grunwald and B. Zorn. CustoMalloc: efficient synthesized memory allocators. Softw. Pract. Exper., 23(8):851--869, 1993.
    [12]
    D. Grunwald, B. Zorn, and R. Henderson. Improving the cache locality of memory allocation. In PLDI, pages 177--186, New York, NY, USA, 1993. ACM Press.
    [13]
    J. Hallberg, T. Palm, and M. Brorsson. Cache-Conscious Allocation of Pointer-Based Data Structures Revisited with HW/SW Prefetching, 2003.
    [14]
    D. S. Hirschberg. A class of dynamic memory allocation algorithms. Commun. ACM, 16(10):615--618, 1973.
    [15]
    M. Hirzel. Data layouts for object-oriented programs. SIGMETRICS Perform. Eval. Rev., 35(1):265--276, 2007.
    [16]
    Standard Performance Evaluation Corporation - SPEC - CPU2006. http://www.spec.org/cpu2006.
    [17]
    X. Huang, S. M. Blackburn, K. S. McKinley, J E. B. Moss, Z. Wang, and P. Cheng. The garbage collection advantage: improving program locality. In OOPSLA, pages 69--80, New York, NY, USA, 2004. ACM Press.
    [18]
    M. S. Johnstone and P. R. Wilson. The memory fragmentation problem: solved? In ISMM, pages 26--36, New York, NY, USA, 1998. ACM Press.
    [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]
    Poul-Henning Kamp. Malloc(3) revisited.
    [22]
    S. F. Kaplan, L. A. McGeoch, and M. F. Cole. Adaptive caching for demand prepaging. In ISMM, pages 114--126, New York, NY, USA, 2002. ACM Press.
    [23]
    K. C. Knowlton. A fast storage allocator. Commun. ACM, 8(10):623--624, 1965.
    [24]
    D. E. Knuth. The art of computer programming, volume 1 (3rd ed.): fundamental algorithms. Addison Wesley Longman Publishing Co., Inc., Redwood City, CA, USA, 1997.
    [25]
    C. Lattner and V. Adve. Automatic pool allocation: improving performance by controlling data structure layout in the heap. In PLDI, pages 129--142, New York, NY, USA, 2005. ACM Press.
    [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]
    Y. Shuf, M. Gupta, H. Franke, A. Appel, and J. Pal Singh. Creating and preserving locality of java applications at allocation and garbage collection times. In OOPSLA, pages 13--25, New York, NY, USA, 2002. ACM Press.
    [29]
    M. Tofte. A brief introduction to regions. In ISMM, pages 186--195, New York, NY, USA, 1998. ACM Press.
    [30]
    D. N. Truong, F. Bodin, and A. Seznec. Improving Cache Behavior of Dynamically Allocated Data Structures. In PACT, page 322, Washington, DC, USA, 1998. IEEE Computer Society.
    [31]
    K. Vo. Vmalloc: A general and efficient memory allocator. Software Practice and Experience, pages 357--374, 1996. 26(3).
    [32]
    C. B . Weinstock and W. A. Wulf. QuickFit: An Efficient Algorithm for Heap Storage Allocation. ACM SIGPLAN Notices, pages 141--144, 1988. 23(10).
    [33]
    P. R. Wilson, M. S. Johnstone, M. Neely, and D. Boles. Dynamic Storage Allocation: A Survey and Critical Review. In IWMM '95: Proceedings of the International Workshop on Memory Management, pages 1--116, London, UK, 1995. Springer-Verlag.
    [34]
    W. A. Wulf and S. A. McKee. Hitting the memory wall: implications of the obvious. SIGARCH Comput. Archit. News, 23(1):20--24, 1995

    Cited By

    View all
    • (2020)HALO: post-link heap-layout optimisationProceedings of the 18th ACM/IEEE International Symposium on Code Generation and Optimization10.1145/3368826.3377914(94-106)Online publication date: 22-Feb-2020
    • (2019)Timescale functions for parallel memory allocationProceedings of the 2019 ACM SIGPLAN International Symposium on Memory Management10.1145/3315573.3329987(64-78)Online publication date: 23-Jun-2019
    • (2016)Rethinking a heap hierarchy as a cache hierarchy: a higher-order theory of memory demand (HOTM)ACM SIGPLAN Notices10.1145/3241624.292670851:11(111-121)Online publication date: 14-Jun-2016
    • Show More Cited By

    Recommendations

    Comments

    Information & Contributors

    Information

    Published In

    cover image ACM Conferences
    ISMM '09: Proceedings of the 2009 international symposium on Memory management
    June 2009
    158 pages
    ISBN:9781605583471
    DOI:10.1145/1542431
    Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

    Sponsors

    Publisher

    Association for Computing Machinery

    New York, NY, United States

    Publication History

    Published: 19 June 2009

    Permissions

    Request permissions for this article.

    Check for updates

    Qualifiers

    • Research-article

    Conference

    ISMM '09
    Sponsor:

    Acceptance Rates

    ISMM '09 Paper Acceptance Rate 15 of 32 submissions, 47%;
    Overall Acceptance Rate 72 of 156 submissions, 46%

    Contributors

    Other Metrics

    Bibliometrics & Citations

    Bibliometrics

    Article Metrics

    • Downloads (Last 12 months)11
    • Downloads (Last 6 weeks)2
    Reflects downloads up to 10 Aug 2024

    Other Metrics

    Citations

    Cited By

    View all
    • (2020)HALO: post-link heap-layout optimisationProceedings of the 18th ACM/IEEE International Symposium on Code Generation and Optimization10.1145/3368826.3377914(94-106)Online publication date: 22-Feb-2020
    • (2019)Timescale functions for parallel memory allocationProceedings of the 2019 ACM SIGPLAN International Symposium on Memory Management10.1145/3315573.3329987(64-78)Online publication date: 23-Jun-2019
    • (2016)Rethinking a heap hierarchy as a cache hierarchy: a higher-order theory of memory demand (HOTM)ACM SIGPLAN Notices10.1145/3241624.292670851:11(111-121)Online publication date: 14-Jun-2016
    • (2016)Rethinking a heap hierarchy as a cache hierarchy: a higher-order theory of memory demand (HOTM)Proceedings of the 2016 ACM SIGPLAN International Symposium on Memory Management10.1145/2926697.2926708(111-121)Online publication date: 14-Jun-2016
    • (2016)On the detection of custom memory allocators in C binariesEmpirical Software Engineering10.1007/s10664-015-9362-z21:3(753-777)Online publication date: 1-Jun-2016
    • (2015)Cross-layer memory management for managed language applicationsACM SIGPLAN Notices10.1145/2858965.281432250:10(488-504)Online publication date: 23-Oct-2015
    • (2015)Cross-layer memory management for managed language applicationsProceedings of the 2015 ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages, and Applications10.1145/2814270.2814322(488-504)Online publication date: 23-Oct-2015
    • (2014)Dynamic page sharing optimization for the R languageACM SIGPLAN Notices10.1145/2775052.266109450:2(79-90)Online publication date: 14-Oct-2014
    • (2014)Dynamic page sharing optimization for the R languageProceedings of the 10th ACM Symposium on Dynamic languages10.1145/2661088.2661094(79-90)Online publication date: 20-Oct-2014
    • (2013)Who allocated my memory? Detecting custom memory allocators in C binaries2013 20th Working Conference on Reverse Engineering (WCRE)10.1109/WCRE.2013.6671277(22-31)Online publication date: Oct-2013
    • Show More Cited By

    View Options

    Get Access

    Login options

    View options

    PDF

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader

    Media

    Figures

    Other

    Tables

    Share

    Share

    Share this Publication link

    Share on social media