Arena Allocators in C
12 points by eliasebner
12 points by eliasebner
I went through an entire computer engineering degree and never once were arena allocators brought up, and we did a ton of C. Such an obviously useful technique.
One issue with the code as presented is that the author is using C23 without mentioning it (the [[nodiscard]] attribute is C23, and attributes in general are a C23 feature). Another issue I noticed is pointer arithmetic on a void *. That simply isn't allowed by any C standard that I know of, but GCC does permit it as a compiler extension.