Collection of miscellaneous single-header libraries.
Library | Description |
---|---|
autolist.h | A list of items collected from all compilation units |
xincbin.h | A cross-platform way to include binary data in your executable |
bresmon.h | File watcher |
mem_layout.h | Combine multiple mallocs of a nested struct into one |
barena.h | Arena allocator |
tlsf.h | Adaptation of jserv/tlsf-bsd |
bhash.h | Hashtable |
bcoro.h | Coroutine |
bserial.h | Binary serialization |
Each one has example and documentation in the corresponding tests directory.
Tested on:
- Linux (GCC+Clang)
- Windows (MSVC)
Whenever a library needs to allocate memory a memctx
argument can be passed to it.
By default it uses libc for memory and memctx
is ignored.
The macro <NAME>_REALLOC
can be used to override the allocator.
BLIB_REALLOC
is also recognized as a catch-all allocator.