Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Install tcmalloc on CentOS

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.

like image 405
itsjc Avatar asked Oct 28 '25 17:10

itsjc


1 Answers

The package names have changed a little. Just run:

yum install gperftools gperftools-devel

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

like image 160
Eljuan Avatar answered Oct 31 '25 08:10

Eljuan



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!