明确使用 tcmalloc,而不覆盖系统的 malloc/free
作者: sillykelvin创建于 2018年11月19日更新于 2026年3月17日
标签trivial-to-contributealk-wants-this-soon
在我们的应用中,我们希望使用系统的 `malloc/free` 调用(这里是 glibc),而当我们想使用 tcmalloc 时,可以明确调用 `tc_malloc/tc_free`。然而,在我们使用 `-ltcmalloc_minimal` 链接到 tcmalloc 后,似乎所有的 `malloc/free` 都被替换了。
内容来源: gperftools/gperftools