| 1 |
[Heap Layers: An Extensible Memory Allocation Infrastructure](http://www.heaplayers.org) |
| 2 |
----------------------------------------------------------- |
| 3 |
|
| 4 |
Copyright (C) 2000 - 2018 by [Emery Berger](http://www.emeryberger.com) |
| 5 |
|
| 6 |
Heap Layers is distributed under the terms of the Apache 2.0 license. |
| 7 |
|
| 8 |
## Introduction ## |
| 9 |
|
| 10 |
Heap Layers provides a flexible infrastructure for composing |
| 11 |
high-performance memory allocators out of C++ _layers_. Heap Layers |
| 12 |
makes it easy to write high-quality custom and general-purpose |
| 13 |
memory allocators. Heap Layers has been used successfully to build |
| 14 |
a number of high-performance allocators, including [Hoard](http://www.hoard.org) and [DieHard](http://www.diehard-software.org/). |
| 15 |
|
| 16 |
## Using Heap Layers ## |
| 17 |
|
| 18 |
For an introduction to Heap Layers, read the article [Policy-Based |
| 19 |
Memory Allocation](http://www.drdobbs.com/policy-based-memory-allocation/184402039), by Andrei |
| 20 |
Alexandrescu and Emery Berger. It's a good overview. |
| 21 |
|
| 22 |
Heap Layers contains a number of ready-made heap components that can |
| 23 |
be plugged together with minimal effort, and the result is often |
| 24 |
faster than hand-built allocators. The PLDI 2001 paper [Composing |
| 25 |
High-Performance Memory |
| 26 |
Allocators](http://www.cs.umass.edu/~emery/pubs/berger-pldi2001.pdf) |
| 27 |
has plenty of examples. |
| 28 |
|
| 29 |
## Performance ## |
| 30 |
|
| 31 |
Heap Layers can substantially outperform its only real competitor, |
| 32 |
the Vmalloc package from AT&T. The OOPSLA 2002 paper [Reconsidering |
| 33 |
Custom Memory |
| 34 |
Allocation](http://www.cs.umass.edu/~emery/pubs/berger-oopsla2002.pdf) |
| 35 |
paper has more details. |
| 36 |
|
| 37 |
Not only is Heap Layers much higher level and simpler to use, but |
| 38 |
its use of templates also improves performance. Heap Layers both |
| 39 |
eliminates the function call overhead imposed by Vmalloc layers and |
| 40 |
yields higher quality code by exposing more optimization |
| 41 |
opportunities. |
| 42 |
|
| 43 |
## Citation ## |
| 44 |
|
| 45 |
To reference Heap Layers in an academic paper, please cite as follows: |
| 46 |
|
| 47 |
```@inproceedings{DBLP:conf/pldi/BergerZM01, |
| 48 |
author = {Emery D. Berger and |
| 49 |
Benjamin G. Zorn and |
| 50 |
Kathryn S. McKinley}, |
| 51 |
title = {Composing High-Performance Memory Allocators}, |
| 52 |
booktitle = {Proceedings of the 2001 {ACM} {SIGPLAN} Conference on Programming |
| 53 |
Language Design and Implementation (PLDI), Snowbird, Utah, USA, June |
| 54 |
20-22, 2001}, |
| 55 |
pages = {114--124}, |
| 56 |
year = {2001}, |
| 57 |
crossref = {DBLP:conf/pldi/2001}, |
| 58 |
url = {https://doi.org/10.1145/378795.378821}, |
| 59 |
doi = {10.1145/378795.378821}, |
| 60 |
timestamp = {Wed, 14 Nov 2018 10:54:59 +0100}, |
| 61 |
biburl = {https://dblp.org/rec/bib/conf/pldi/BergerZM01}, |
| 62 |
bibsource = {dblp computer science bibliography, https://dblp.org} |
| 63 |
} |
| 64 |
|
| 65 |
@proceedings{DBLP:conf/pldi/2001, |
| 66 |
editor = {Michael Burke and |
| 67 |
Mary Lou Soffa}, |
| 68 |
title = {Proceedings of the 2001 {ACM} {SIGPLAN} Conference on Programming |
| 69 |
Language Design and Implementation (PLDI), Snowbird, Utah, USA, June |
| 70 |
20-22, 2001}, |
| 71 |
publisher = {{ACM}}, |
| 72 |
year = {2001}, |
| 73 |
url = {http://dl.acm.org/citation.cfm?id=378795}, |
| 74 |
isbn = {1-58113-414-2}, |
| 75 |
timestamp = {Mon, 21 May 2012 16:19:53 +0200}, |
| 76 |
biburl = {https://dblp.org/rec/bib/conf/pldi/2001}, |
| 77 |
bibsource = {dblp computer science bibliography, https://dblp.org} |
| 78 |
} |
| 79 |
``` |
| 80 |
|