Comment by Panzerschrek
4 days ago
> Imagine that you had a streaming world game where as the player ran around the world, old level geometry would deallocate, and new level geometry would allocate and stream in from disk.
In such case stack-like allocator isn't the best strategy. One can use some sort of cyclic allocator instead. As I know Quake did this for surfaces cache.
Interestingly, Quake 3 did use a double sided stack allocator as the article describes. The engine made one big allocation at startup called the "hunk." The "low hunk" allocated long-lived data and the "high hunk" temporary data. Search for "hunk" in this source file to see the implementation [1].
[1] https://github.com/id-Software/Quake-III-Arena/blob/master/c...