Programming (broken link for now 2022-09-site-upgrade)

A nice video clip to intro to the overall issue:

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:

dynamic allocation is like lying to yourself

Fundamental concepts: (concise overview)

Implementation details:

  • nice simple linear allocator that you just move forward with each allocation / push