[Heap Layers]
an infrastructure for building high-performance allocators

what is it?   Heap Layers provides a flexible infrastructure for composing high-performance memory allocators out of C++ "layers". Heap Layers makes it easy to write high-quality custom and general-purpose memory allocators.
why should I use it?


  Heap Layers contains a number of ready-made heap components that can be plugged together with minimal effort, and the result is often faster than hand-built allocators. The "Composing High-Performance Memory Allocators" paper below has plenty of examples.

Very importantly, we've shown that Heap Layers can substantially outperform its only real competitor, the Vmalloc package from AT&T (the "Reconsidering Custom Memory Allocation" paper has more details). Not only is Heap Layers much higher level and simpler to use, but its clever use of templates also improves performance. Heap Layers both eliminates the function call overhead imposed by Vmalloc layers and yields higher quality code by exposing more optimization opportunities.

software Download the latest release: Heap Layers 3.4.0.
Heap Layers has been tested under Linux, Solaris, and Windows. We've released Heap Layers under the GNU Public License.

Also available is the benchmark suite used in the paper below, and previous versions: Heap Layers 0.2 (Zip, Tarball).
Subscribe to Heap Layers
Subscribe to this list to be informed of updates and bug fixes for Heap Layers.

Enter your e-mail address:

This is a mailing list for Heap Layers-related discussions.
view the message archive

Read the article by Andrei Alexandrescu & myself on Heap Layers.

The following paper describes the first version of Heap Layers, demonstrating its power and convenience:

Composing High-Performance Memory Allocators
Emery Berger, Ben Zorn & Kathryn McKinley

PLDI 2001 (PowerPoint slides for the talk)

We have used Heap Layers to develop a new memory allocation abstraction we call reaps, a combination of regions (a.k.a. arenas, zones, & pools) and heaps. Reaps outperform similar allocators and comes close to matching region performance while allowing for reduced memory consumption. Our implementation is included in the software distribution above and described in the following paper:

Reconsidering Custom Memory Allocation
Emery Berger, Ben Zorn & Kathryn McKinley

OOPSLA 2002 (PowerPoint slides for the talk)

Heap Layers by Emery Berger, The University of Massachusetts - Amherst

This material is based upon work supported by the National Science Foundation under Grant No. CNS-0347339 (CAREER). Any opinions, findings and conclusions or recomendations expressed in this material are those of the author(s) and do not necessarily reflect the views of the National Science Foundation (NSF).