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.
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.