本文介绍了如何使用TCMalloc?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

首先,我想知道如何在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?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-02 08:07