skip to main content
10.1145/1772954.1772969acmconferencesArticle/Chapter ViewAbstractPublication PagescgoConference Proceedingsconference-collections
research-article

On improving heap memory layout by dynamic pool allocation

Published: 24 April 2010 Publication History

Abstract

Dynamic memory allocation is widely used in modern programs. General-purpose heap allocators often focus more on reducing their run-time overhead and memory space utilization, but less on exploiting the characteristics of their allocated heap objects. This paper presents a lightweight dynamic optimizer, named Dynamic Pool Allocation (DPA), which aims to exploit the affinity of the allocated heap objects and improve their layout at run-time. DPA uses an adaptive partial call chain with heuristics to aggregate affinitive heap objects into dedicated memory regions, called memory pools. We examine the factors that could affect the effectiveness of such layout. We have implemented DPA and measured its performance on several SPEC CPU 2000 and 2006 benchmarks that use extensive heap objects. Evaluations show that it could achieve an average speed up of 12.1% and 10.8% on two x86 commodity machines respectively using GCC -O3, and up to 82.2% for some benchmarks.

References

[1]
L. O. Andersen. Program Analysis and Specialization for the C Programming Language. PhD thesis, University of Copenhagen, 1994.
[2]
D. A. Barrett and B. G. Zorn. Using lifetime predictors to improve memory allocation performance. In Conference on Programming Language Design and Implementation, pages 187--196, 1993.
[3]
B. Calder, C. Krintz, S. John, and T. Austin. Cache-conscious data placement. In Architectural Support for Programming Languages and Operating Systems, pages 139--149, 1998.
[4]
D. R. Chase, M. Wegman, and F. K. Zadeck. Analysis of pointers and structures. In Conference on Programming Language Design and Implementation, pages 296--310, 1990.
[5]
C. J. Cheney. A nonrecursive list compacting algorithm. Communications of the ACM, 13(11):677--678, 1970.
[6]
T. M. Chilimbi and J. R. Larus. Using generational garbage collection to implement cache-conscious data placement. In International Symposium on Memory Management, pages 37--48, 1998.
[7]
T. M. Chilimbi and R. Shaham. Cache-conscious coallocation of hot data streams. In Conference on Programming Language Design and Implementation, pages 252--262, 2006.
[8]
T. M. Chilimbi, B. Davidson, and J. R. Larus. Cache-conscious structure definition. In Conference on Programming Language Design and Implementation, pages 13--24, 1999.
[9]
T. M. Chilimbi, M. D. Hill, and J. R. Larus. Cache-conscious structure layout. In Conference on Programming Language Design and Implementation, pages 1--12, 1999.
[10]
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 Conference on Object Oriented Programming Systems Languages and Applications, pages 69--80, 2004.
[11]
C. Lattner and V. Adve. Automatic pool allocation: Improving performance by controlling data structure layout in the heap. In Conference on Programming Language Design and Implementation, pages 129--142, 2005.
[12]
D. Lea. A memory allocator. The C++ Report, 1989.
[13]
J. Lu, A. Das, and W. Hsu. Dynamic helper threaded prefetching on the sun ultrasparc cmp processor. In International Symposium on Microarchitecture, 2005.
[14]
M. Marron, D. Kapur, and M. Hermenegildo. Identification of logically related heap regions. In International Symposium onMemory Management, pages 89--98, 2009.
[15]
M. L. Seidl and B. G. Zorn. Segregating heap objects by reference behavior and lifetime. In Architectural Support for Programming Languages and Operating Systems, pages 12--23, 1998.
[16]
M. J. Serrano and X. Zhuang. Placement optimization using data context collected during garbage collection. In International Symposium on Memory Management, pages 69--78, 2009.
[17]
B. Steensgaard. Points-to analysis in almost linear time. In Annual Symposium on Principles of Programming Languages, pages 32--41, 1996.
[18]
Q. Zhao, R. Rabbah, and W. Wong. Dynamic memory optimization using pool allocation and prefetching. ACM SIGARCH Computer Architecture News, 33(5):27--32, 2005.

Cited By

View all
  • (2025)PreFix: Optimizing the Performance of Heap-Intensive ApplicationsProceedings of the 23rd ACM/IEEE International Symposium on Code Generation and Optimization10.1145/3696443.3708960(405-417)Online publication date: 1-Mar-2025
  • (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)Evaluating the effectiveness of program data features for guiding memory managementProceedings of the International Symposium on Memory Systems10.1145/3357526.3357537(383-395)Online publication date: 30-Sep-2019
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
CGO '10: Proceedings of the 8th annual IEEE/ACM international symposium on Code generation and optimization
April 2010
300 pages
ISBN:9781605586359
DOI:10.1145/1772954
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

In-Cooperation

  • IEEE CS uArch

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 24 April 2010

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. adaptive partial call chain
  2. data layout
  3. dynamic optimization
  4. pool allocation

Qualifiers

  • Research-article

Conference

CGO '10

Acceptance Rates

Overall Acceptance Rate 312 of 1,061 submissions, 29%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)34
  • Downloads (Last 6 weeks)6
Reflects downloads up to 25 Feb 2025

Other Metrics

Citations

Cited By

View all
  • (2025)PreFix: Optimizing the Performance of Heap-Intensive ApplicationsProceedings of the 23rd ACM/IEEE International Symposium on Code Generation and Optimization10.1145/3696443.3708960(405-417)Online publication date: 1-Mar-2025
  • (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)Evaluating the effectiveness of program data features for guiding memory managementProceedings of the International Symposium on Memory Systems10.1145/3357526.3357537(383-395)Online publication date: 30-Sep-2019
  • (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
  • (2017)You can have it all: abstraction and good cache performanceProceedings of the 2017 ACM SIGPLAN International Symposium on New Ideas, New Paradigms, and Reflections on Programming and Software10.1145/3133850.3133861(148-167)Online publication date: 25-Oct-2017
  • (2017)Enhancing the Malloc System with Pollution Awareness for Better Cache PerformanceIEEE Transactions on Parallel and Distributed Systems10.1109/TPDS.2016.258764428:3(731-745)Online publication date: 1-Mar-2017
  • (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
  • (2012)Automatically enhancing locality for tree traversals with traversal splicingACM SIGPLAN Notices10.1145/2398857.238464347:10(355-374)Online publication date: 19-Oct-2012
  • (2012)Automatically enhancing locality for tree traversals with traversal splicingProceedings of the ACM international conference on Object oriented programming systems languages and applications10.1145/2384616.2384643(355-374)Online publication date: 19-Oct-2012
  • Show More Cited By

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Figures

Tables

Media

Share

Share

Share this Publication link

Share on social media