Siputbiru/sbl ? reverse-engineered prompt
Reverse engineered prompt
Build me a small STB style C library called sbl, starting with a single header arena allocator named sbl_arena.
I want it to be easy to drop into any C project, with the usual one file include setup, and a simple way to use it without extra dependencies. Make the allocator feel like a proper arena, with clear functions for creating it, allocating from it, resetting it, and cleaning it up. Keep the public API simple and friendly, and make the header work cleanly in both declaration and implementation mode like other single header libraries.
Please also add a few basic tests or example usage so I can see how it is supposed to be used. If you need to, look up the current STB style single header pattern online and follow that style closely. Keep the code readable, portable, and C focused, since this project is meant to be a tiny reusable utility library.
Are you gonna build this?
make sure you review the code using coderabbit