2 ms·
Why is this better than an arena style allocator?
by mathiasgredal 3y ago
Why is this better than an arena style allocator?
- akoboldfrying 3y agoIt is an arena-style allocator. At least, if someone asked me to explain what an arena allocator is/does, I would say essentially what they wrote -- likely without the "disappears automatically once all references disappear" part, which is IMHO just a clever nice-to-have.
- OnlyMortal 3y agoYou allocate a large lump of memory up front and supply parts of it on demand. This would be different from an allocator which may allocate smaller amounts of memory as needed. This can help reduce memory fragmentation. It also helps to bound your memory usage. A request could block until memory was free.