在CentOS上安装tcmalloc [英] Install tcmalloc on CentOS

查看:145
本文介绍了在CentOS上安装tcmalloc的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用以下命令在CentOS上安装了 tcmalloc :

I installed tcmalloc on CentOS using the command:

sudo yum install google-perftools

它正确进行.但是我在/usr/lib/中找不到任何已安装的perftools库,因此无法设置 LD_PRELOAD 变量.

And it proceeds correctly. But I cannot find any installed perftools libraries in /usr/lib/, so I cannot set LD_PRELOAD variable.

然后,当我尝试使用标志 -ltcmalloc 进行编译时,编译器无法识别它,这很有意义.

Then, when I tried to compile with flag -ltcmalloc, the compiler did not recognize it, which quite made sense.

在CentOS上还应指定什么使用 tcmalloc ?谢谢.

What else should I specify to use tcmalloc on CentOS? Thanks.

推荐答案

程序包名称有所更改.只需运行:

The package names have changed a little. Just run:

yum install gperftools gperftools-devel

...,您将在/usr/lib64/

...and you'll find various libtcmalloc files in /usr/lib64/

这篇关于在CentOS上安装tcmalloc的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆