![]() |
Public API Reference |
![]() |
An allocator with a small local buffer. More...
#include <csutil/allocator.h>
An allocator with a small local buffer.
If the data fits into the local buffer (which is set up to holds N
elements of type T
), a memory allocation from the heap is saved. Thus, if you have lots of arrays with a relatively small, well known size you can gain some performance by using this allocator. SingleAllocation
specifies whether no more than a single block is allocated from the allocator at any time. Using that option saves (albeit a miniscule amount of) memory, but obviously is only safe when it's known that the single allocation constraint is satisfied (such as allocators for csArray<>s).
Definition at line 152 of file allocator.h.