Core Utils Block Allocator
Documentation for core/include/utils/blockAllocator
Page Contents
Motivation
We create stl-compatible custom block allocators for various types which allows for fast allocation and free-ing.
Note
xY.h
is such that the x
describes that we are using the custom allocator class, and the Y
describes the underlying type e.g: list
or map
, etc.
References
For more context, read:
TL;DR global heap allocation can be slow and nondeterministic. Also, this eliminates the possibility of memory allocation fault caused by a fragmented heap.
TL;DR replaces malloc and free with xmalloc and xfree which take advantage of the Allocator from above
TL;DR describes how to create a STL-compatible version of the above code.