Settings

Theme

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

github.com

2 points by TobinCavanaugh 2 years ago · 1 comment · 1 min read

Reader

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.

Gibbon1 2 years 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.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection