summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Sotoudeh <matthew@masot.net>2024-05-17 13:57:50 -0700
committerMatthew Sotoudeh <matthew@masot.net>2024-05-17 13:57:50 -0700
commit31eac7e4dec9dea0c467fe87324ea6a5a21a6775 (patch)
treec35b143d50d4a375ae515d47ed1166fb0dddab59
parent789daf4fac13a91d5c526cf93b65571ecb4f460c (diff)
update readme
-rw-r--r--README25
1 files changed, 18 insertions, 7 deletions
diff --git a/README b/README
index 0717846..6e2ba19 100644
--- a/README
+++ b/README
@@ -2,20 +2,31 @@
A buddy allocator with zero metadata overhead.
-Benefits are:
+Benefits over buddy allocators that store a free-or-not bit on the block:
- 1. Very good use of space compared to traditional buddy allocators,
- especially if you are frequently requesting power-of-two allocations.
+ 1. When you request an allocation of 2^k, it only allocates 2^k space, not
+ 2^{k+1} to account for the extra free-or-not-bit.
- 2. Still constant-time allocation and liberation.
+Benefits over buddy allocators that store a bitset:
- 3. The library is small, simple, and convenient to use. It even supports
+ 1. You save at least a few MB in metadata, or more if you're allocating
+ huge amounts of space.
+
+ 2. Comparably simple implementation; only ~250 loc, and there is no need to
+ track a metadata region.
+
+Features of the allocator shared with other buddy allocators include:
+
+ 1. All operations are constant time/linear only in the number of address
+ bits.
+
+ 2. The library is small, simple, and convenient to use. It even supports
unaligned base addresses.
- 4. Support for realloc and reserving subregions (e.g., device MMIO
+ 3. Support for realloc and reserving subregions (e.g., device MMIO
addresses).
- 5. Core functionality is reasonably well-tested with an exhaustive
+ 4. Core functionality is reasonably well-tested with an exhaustive
implementation model checker.
Caveats are:
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback