2 ms·
One often uses these allocators for temporary allocations in contexts where you can reset them at a known time. For example, in a game you put a lot of temporar
by laserbeam 4y ago
One often uses these allocators for temporary allocations in contexts where you can reset them at a known time. For example, in a game you put a lot of temporary stuff in them faster than by using a general purpose allocator, and then call .reset() at the end of every frame. You then reuse the same memory buffer next frame.
Every allocator other than a general purpose allocator has a use case where it's faster, and assumes you know what you're doing with it.