top | item 40791319

Show HN: I made a library for dynamic stack strings in C

2 points| TobinCavanaugh | 1 year ago |github.com

I got sick of the manual memory management of building out strings for paths or debug info etc, and made this library to help with that. I also don't like using fixed size buffers, feels icky. Includes arena like functionality if you're using GCC.

1 comment

order

Gibbon1|1 year ago

I've been playing with this arena bump allocator.

https://github.com/gilzoide/c-allocators

I've been using it with an event driven code where after an event is fired off and returns the handler just hard resets the arena.

You could probably use something like that as well.

Either way I support not mixing manual memory management with business logic.