tcmalloc为何快,如何替换系统malloc

使用了thread cache,小块的内存分配均可以从cache中分配。多线程分配内存的状况下,能够减小锁竞争。html tcmalloc官方文档见: https://gperftools.github.io/gperftools/tcmalloc.htmlgit tcmalloc能够替换大多数系统、不一样编译器环境下的内存分配函数(malloc/free/new/delete),针对不一样的编译
相关文章
相关标签/搜索