Generic, header-only and performant data structures. New memory allocation is kept to a minimum.
All data types are expected to be Plain-Old-Datas (PODs). No explicit iterator mechanism is provided, but macros can provide a primitive syntactical replacement.
Made for my own exploration and use.
Run make test
to run all tests and examples. The libsan
and ubsan
sanitizers is required for building the tests.
Asserts are used to check various assumptions. Use NDEBUG
flag to turn off asserts in release builds.
File | Description | |
---|---|---|
fstack.h | Fixed-size array-based stack | Documentation Example |
fqueue.h | Fixed-size queue based on ring buffer | Documentation Example |
fpqueue.h | Fixed-size priority queue based on binary (max-)heap | Documentation Example |
fhashtable.h | Fixed-size open-adressing hashtable (robin hood hashing) | Documentation Example |
arena.h | Arena allocator | Documentation Example |
freelist.h | Best-fit free list allocator (with underlying free tree) | Documentation Example |
list.h | Intrusive circular doubly linked list | Documentation Example |
rbtree.h | Intrusive red-black tree | Documentation Example |
- write tests for the ones not tested.
- vector impl
- chaining hashtable impl.