aboutsummaryrefslogtreecommitdiff
path: root/listpool/README.md
blob: ed389806d0e7cc7213d103c99ff708d0e177faf4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# Listpool

A block allocator built from a single, contiguous array of memory that maintains
free and used blocks in doubly linked lists.

A `listpool` is similar to a `mempool`, but the additional structure allows it
to:

- Allocate and free blocks in constant time.
- Traverse used blocks in linear time in the number of used blocks, as opposed
  to the total number of blocks like in a `mempool`.

A `listpool` otherwise provides the same guarantees and characteristics as a
`mempool`.