Programming (broken link for now 2022-09-site-upgrade)
A nice video clip to intro to the overall issue: https://hero.handmade.network/episode/code/day626/#4408
Untangling Lifetimes: The Arena Allocator
- @ good example of how arenas can be passed as parameters
- @ great example of a growable entity allocator with a free list
- @ double buffer the frame arena
- @ per-thread scratch arenas
“Learning how to work with arenas entirely revolutionized my experience with writing code in C. I almost never think about memory management, these days—it is not particularly more cumbersome than writing in a garbage-collected scripting language. Unlike such a language, however, I know where my memory is coming from, and when it’ll be “released”, and what that even means.” - rjf
~
another rant: https://hero.handmade.network/episode/code/day034/#5740
dynamic allocation is like lying to yourself
Fundamental concepts:
https://www.gingerbill.org/article/2019/02/01/memory-allocation-strategies-001/ (concise overview)
Implementation details:
https://www.gingerbill.org/article/2019/02/08/memory-allocation-strategies-002/
- nice simple linear allocator that you just move forward with each allocation / push