问题描述
首先,我想知道如何在Ubuntu中安装TCmalloc
.然后我需要一个使用TCmalloc
的程序.然后,我需要一个小程序来证明TCmalloc
的性能优于PTmalloc
.
Firstly, I want to know how to install TCmalloc
in Ubuntu. Then I need a program uses TCmalloc
. Then I need a small program to show that TCmalloc
is working better than PTmalloc
.
推荐答案
我将提供另一个答案,因为与其他答案相比,安装方法更简单:
I'll provide another answer since there's an easier way to install it than in the other answer:
Ubuntu已经有一个用于Google perf工具的软件包: http://packages.ubuntu. com/search?keywords = google-perftools
Ubuntu already has a package for google perf tools: http://packages.ubuntu.com/search?keywords=google-perftools
通过安装libgoogle-perftools-dev,您应该获得开发tcmalloc应用程序所需的全部内容.至于如何实际使用tcmalloc,请参见其他答案.
By installing libgoogle-perftools-dev you should get all that is required for developing tcmalloc applications. As for how to actually use tcmalloc, see the other answer.
这篇关于如何使用TCMalloc?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!