2 ms·
It is a brute force arena allocator. No free needed. But mostly a joke.
by gpderetta 4y ago
It is a brute force arena allocator. No free needed. But mostly a joke.
- flohofwoe 4y agoIt's a completely valid memory management strategy for "one-shot" command line tools though.
- rwmj 4y agoIt is. Unfortunately when I tried to use it in a particular product, I got so much negative feedback from our Coverity and other static analysis tools that I have given in and added calls to free everywhere.
- mort96 4y agoIt's more than that. It's a "valid" strategy even for long lived servers. Fork, do the thing which requires heap memory in the child, then exit the child (but the parent keeps running).