Install tcmalloc on CentOS

∥☆過路亽.° 提交于 2021-02-08 06:14:37

问题


I installed tcmalloc on CentOS using the command:

sudo yum install google-perftools

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

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

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


回答1:


You can always build from source. I have done that with my centos 8.

Source code can be found here: https://github.com/google/tcmalloc. Be aware you will need bazel for building the project.




回答2:


The package names have changed a little. Just run:

yum install gperftools gperftools-devel

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



来源:https://stackoverflow.com/questions/52103646/install-tcmalloc-on-centos

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!