4 ms·
I’ve heard many gamedevs make specialized allocators for some of their code (the most being arena allocators)...
by lasagnaphil 8y ago
I’ve heard many gamedevs make specialized allocators for some of their code (the most being arena allocators)...
- 01100011 8y agoIt's fairly common to avoid naked malloc()/free() in systems with real-time requirements. Memory pools are a great way to go if you want deterministic behavior and better reliability.
- archi42 8y agoThis. If you're going to malloc/free equally sized objects often but randomly, a pool allocator can be a great improvement. With real time requirements you often care about your response time or worst case execution time. In some areas of embedded, safety critical systems you're usually prohibited from using heap at all (instead, stuff is put in global variables or on the stack - so you're only growing in one direction).
- Thaxll 8y agoAll major game engines have custom memory allocator.