Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
A header-only C allocator library (github.com/abdimoallim)
2 points by abdimoalim 6 days ago | hide | past | favorite | 1 comment
 help



Hi everyone, I took some time to release this allocator library for C which has various common patterns, e.g. arenas, pools, GPA, temporary and stack allocators. I found myself rewriting arenas/pools many times and since the same ideas exist in Zig, it would be useful to have this in C. In Rust/C++, there are a few external libraries, std::allocator class template isn't particularly concrete, it only provides an interface (allocator_traits).

It also makes it trivial to write a custom allocator. Cheers!

Link: https://github.com/abdimoallim/alloc




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: