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 already has a package for google perf tools: http://packages.ubuntu.com/search?keywords=google-perftools
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.