3 ms·
It's a good technical explanation of how arena allocation (a useful and easily googleable memory management technique) works in practice, in C, along with: * A
by omnicognate 4y ago
It's a good technical explanation of how arena allocation (a useful and easily googleable memory management technique) works in practice, in C, along with:
* A lot of arguing that all other ways of dealing with the problem (garbage collectors, RAII, etc) are misguided and make for worse programs. This is a lot more controversial than "arena allocation is useful" but I have some sympathy for it. He's not alone in thinking it. See the "Handmade Network" which this guy is associated with.
* A brief and unnecessary bit of free market fundamentalist politics, which seems par for the course for him.
* A general implication that he came up with this stuff himself, which he didn't. Arena allocation (under that name) dates back to the sixties.
- GoblinSlayer 4y agoHe talks about gamedev, and arena allocators are common sense in gamedev. It's more like introduction of a gamedev concept to business programming. Also: >Learning how to work with arenas entirely revolutionized my experience with writing code in C. But, right, arena allocator is a tool, not a solution, you still have to invent a solution every time, it's still manual memory management, just an easier one.
- drainyard 4y agoIf it seems like he is implying he came up with arena allocators himself, that is definitely not intended. I didn't read it like that though.
- rfleury 4y ago> A general implication that he came up with this stuff himself, which he didn't. How in the world did you get this from the article? Of course I didn't invent it, nor did I ever claim (or imply) that.
- omnicognate 4y agoI don't think you intended to create that impression, but I didn't go looking for it either. It's created by phrasing like > In this post, I’ll be presenting an alternative to the traditional strategy of manual memory management that I’ve had success with: the arena allocator. and > My approach, on the other hand, is this: instead of assuming that malloc and free were the correct low-level operations, we can change the memory allocation interface... Together with a complete absence of any reference to the history of the technique or any of the people besides you involved in its development. It's not an accusation, but it's a clarification worth making as I genuinely think someone without knowledge of the subject could come away thinking you were presenting your own innovation.