Improving the cache locality of memory allocation
- 1 June 1993
- proceedings article
- Published by Association for Computing Machinery (ACM)
- Vol. 28 (6), 177-186
- https://doi.org/10.1145/155090.155107
Abstract
The allocation and disposal of memory is a ubiquitous operation in most programs. Rarely do programmers concern themselves with details of memory allocators; most assume that memory allocators provided by the system perform well. This paper presents a performance evaluation of the reference locality of dynamic storage allocation algorithms based on trace-driven simualtion of five large allocation-intensive C programs. In this paper, we show how the design of a memory allocator can significantly affect the reference locality for various applications. Our measurements show that poor locality in sequential-fit allocation algorithms reduces program performance, both by increasing paging and cache miss rates. While increased paging can be debilitating on any architecture, cache misses rates are also important for modern computer architectures. We show that algorithms attempting to be space-efficient by coalescing adjacent free objects show poor reference locality, possibly negating the benefits of space efficiency. At the other extreme, algorithms can expend considerable effort to increase reference locality yet gain little in total execution performance. Our measurements suggest an allocator design that is both very fast and has good locality of reference.Keywords
This publication has 15 references indexed in Scilit:
- Using lifetime predictors to improve memory allocation performancePublished by Association for Computing Machinery (ACM) ,1993
- Empirical measurements of six allocation-intensive C programsACM SIGPLAN Notices, 1992
- Caching considerations for generational garbage collectionPublished by Association for Computing Machinery (ACM) ,1992
- Effective “static-graph” reorganization to improve locality in garbage-collected systemsACM SIGPLAN Notices, 1991
- The effect of context switches on cache performancePublished by Association for Computing Machinery (ACM) ,1991
- Performance debugging shared memory multiprocessor programs with MTOOLPublished by Association for Computing Machinery (ACM) ,1991
- An efficient algorithm for heap storage allocationACM SIGPLAN Notices, 1988
- The software lookaside buffler reduces search overhead with linked listsCommunications of the ACM, 1984
- Garbage collection in a large LISP systemPublished by Association for Computing Machinery (ACM) ,1984
- A real-time garbage collector based on the lifetimes of objectsCommunications of the ACM, 1983