4 ms·
there's a common gamedev practice of allocating a big chunk of memory up front, and then using a bump allocator inside of it in most games, there are about 3 "
by harrison_clarke 2y ago
there's a common gamedev practice of allocating a big chunk of memory up front, and then using a bump allocator inside of it
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
- greathones 2y agowhere to read more? any books? articles?
- harrison_clarke 2y agogame engine architecture, by jason gregory 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 https://www.rfleury.com/p/enter-the-arena-talk