I have ported
@sebbbi
OffsetAllocator C++ library to single C header lib: https://github.com/septag/OffsetAllocator

It doesn't use any memory allocation by itself and can be compiled with both C11 and C++20 (designated initializers) compilers.

@septag @sebbbi I think this inherits the slightly bad behavior of calculating the remainder from the unrounded size, which can lead to unbounded memory waste with certain allocation patterns (roughly if you allocate a large object, then a small object, then free the large, you can leave the allocator in a state where it cannot service another large allocation of the same size without allocating a whole new block). Worth checking out the original paper all this is derived from. (Tlsf)