Debian Codegraph @

vendor/Heap-Layers/README.md

raw
1 [Heap Layers: An Extensible Memory Allocation Infrastructure](http://www.heaplayers.org)
2 -----------------------------------------------------------
3
4 Copyright (C) 2000 - 2021 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](https://github.com/emeryberger/Heap-Layers/raw/master/cuj-2005-12.pdf), by Andrei
20 Alexandrescu and Emery Berger. It's a good overview. See also ["Memory Allocation: Either Love It or Hate It
21 (or just think it’s okay)"](https://accu.org/content/conf2008/Alexandrescu-memory-allocation.screen.pdf), a talk by Andrei.
22
23 Heap Layers contains a number of ready-made heap components that can
24 be plugged together with minimal effort, and the result is often
25 faster than hand-built allocators. The PLDI 2001 paper [Composing
26 High-Performance Memory
27 Allocators](http://www.cs.umass.edu/~emery/pubs/berger-pldi2001.pdf)
28 has plenty of examples.
29
30 ## Performance ##
31
32 Heap Layers can substantially outperform its only real competitor,
33 the Vmalloc package from AT&T. The OOPSLA 2002 paper [Reconsidering
34 Custom Memory
35 Allocation](http://www.cs.umass.edu/~emery/pubs/berger-oopsla2002.pdf)
36 paper has more details.
37
38 Not only is Heap Layers much higher level and simpler to use, but
39 its use of templates also improves performance. Heap Layers both
40 eliminates the function call overhead imposed by Vmalloc layers and
41 yields higher quality code by exposing more optimization
42 opportunities.
43
44 ## Citation ##
45
46 To reference Heap Layers in an academic paper, please cite as follows:
47
48 ```
49 @inproceedings{DBLP:conf/pldi/BergerZM01,
50 author = {Emery D. Berger and
51 Benjamin G. Zorn and
52 Kathryn S. McKinley},
53 title = {Composing High-Performance Memory Allocators},
54 booktitle = {Proceedings of the 2001 {ACM} {SIGPLAN} Conference on Programming
55 Language Design and Implementation (PLDI), Snowbird, Utah, USA, June
56 20-22, 2001},
57 pages = {114--124},
58 year = {2001},
59 crossref = {DBLP:conf/pldi/2001},
60 url = {https://doi.org/10.1145/378795.378821},
61 doi = {10.1145/378795.378821},
62 timestamp = {Wed, 14 Nov 2018 10:54:59 +0100},
63 biburl = {https://dblp.org/rec/bib/conf/pldi/BergerZM01},
64 bibsource = {dblp computer science bibliography, https://dblp.org}
65 }
66
67 @proceedings{DBLP:conf/pldi/2001,
68 editor = {Michael Burke and
69 Mary Lou Soffa},
70 title = {Proceedings of the 2001 {ACM} {SIGPLAN} Conference on Programming
71 Language Design and Implementation (PLDI), Snowbird, Utah, USA, June
72 20-22, 2001},
73 publisher = {{ACM}},
74 year = {2001},
75 url = {http://dl.acm.org/citation.cfm?id=378795},
76 isbn = {1-58113-414-2},
77 timestamp = {Mon, 21 May 2012 16:19:53 +0200},
78 biburl = {https://dblp.org/rec/bib/conf/pldi/2001},
79 bibsource = {dblp computer science bibliography, https://dblp.org}
80 }
81 ```
82