Every thread has a thread-local storage for small allocations. For large allocations mmap or sbrk can be used. TCMalloc, a malloc developed by Google,TCMalloc homepage has garbage-collection for local storage of dead threads. The TCMalloc is considered to be more than twice as fast as glibc's ptmalloc for multithreaded programs.Ghemawat, Sanjay; Menage, Paul; TCMalloc : Thread-Caching Malloc
