I want to use TCMalloc with STL containers, so I need a dispenser built using TCMalloc (e.g. tbb_allocator with TBB malloc). I can find nothing TCMalloc Documentation (if this is called documentation). Therefore, I begin to study the header files and find a class called STL_Allocator. But something is not clear to me. Quote from stl_allocator.h:
And the definition of the template class STL_Allocator:
template <typename T, class Alloc>
class STL_Allocator {
}
I have no idea what an argument is Alloc. Should I write a wrapper class for some memory allocation functions? Has anyone used TCMalloc?
source
share