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 Examples |
fqueue.h | Fixed-size queue based on ring buffer | Documentation Examples |
fpqueue.h | Fixed-size priority queue based on binary (max-)heap | Documentation |
fhashtable.h | Fixed-size open-adressing hashtable (robin hood hashing) | Documentation |
arena.h | Arena allocator | Documentation |
pool.h | Pool allocator | Documentation |
freelist.h | Best-fit free list allocator (with underlying free tree) | Documentation |
list.h | Intrusive circular doubly linked list | Documentation |
rbtree.h | Intrusive red-black tree | Documentation |
- write tests for the ones not tested.
- vector impl
- chaining hashtable impl.