Template class for scalable memory allocation.
template<typename T> class scalable_allocator;
#include "tbb/scalable_allocator.h"
A scalable_allocator allocates and frees memory in a way that scales with the number of processors. A scalable_allocator models the Allocator Concept. Using a scalable_allocator in place of std::allocator may improve program performance. Memory allocated by a scalable_allocator should be freed by a scalable_allocator, not by a std::allocator.
The scalable_allocator requires that the tbb malloc library be available. If the library is missing, calls to the scalable allocator fail. In contrast, tbb_allocator falls back on malloc and free if the tbbmalloc library is missing.
See Allocator concept.
The scalable memory allocator incorporates McRT technology developed by Intel's PSL CTG team.