Expand description
Deterministic Binned Free Lists
Provides a size-class allocator with 13 bins (16 B – 64 KB). Each bin maintains a LIFO free list for O(1) alloc/free.
§Determinism guarantees
- LIFO push/pop: same free+alloc sequence → same addresses.
- No OS return: pages are never returned to the OS during normal execution. Memory grows monotonically, freed memory is recycled.
- Deterministic iteration: bins are indexed by size class, not hash-based — iteration order is always the same.
§Size classes
| Bin | Size |
|---|---|
| 0 | 16 B |
| 1 | 32 B |
| 2 | 48 B |
| 3 | 64 B |
| 4 | 128 B |
| 5 | 256 B |
| 6 | 512 B |
| 7 | 1 KB |
| 8 | 2 KB |
| 9 | 4 KB |
| 10 | 8 KB |
| 11 | 16 KB |
| 12 | 64 KB |
Allocations larger than 64 KB go to a dedicated overflow list.
Structs§
- Binned
Allocator - Deterministic binned allocator with LIFO free lists.