by harrison_clarke · 2y ago · 0 comments
in most games, there are about 3 "lifetimes": - permanent/startup - per-level - per-frame
and they're nested. so, you can use a single stack allocator for all of them. at the end of the frame/level, pop back to where it started
there are more complicated patterns, but this one will get you pretty far. you can use it on the CPU and the GPU
there's a section on memory allocation patterns
i believe casey muratori talks about allocation patterns in the handmade hero video series, too
edit: ryan fleury has a talk: https://www.rfleury.com/p/enter-the-arena-talk