Use (experimental) larger pages for tcmalloc, this increases memory usage, but should speed up the allocation/free operations. Build a set of libraries with debug support (so-called debugalloc). These are available by default but are not needed unless you're actually developing using tcmalloc. Only build the tcmalloc_minimal library, ignoring the heap checker and the profilers. To build libtcmalloc with smaller internal caches. gperftools/gperftools