tcmalloc使用说明

http://code.google.com/p/google-perftools/wiki/GooglePerformanceTools

 

 

TC Malloc:

gcc [...] -ltcmalloc
 
 

Heap Checker:

gcc [...] -o myprogram -ltcmalloc
HEAPCHECK
=normal ./myprogram

Heap Profiler:

gcc [...] -o myprogram -ltcmalloc
HEAPPROFILE
=/tmp/netheap ./myprogram

Cpu Profiler:

gcc [...] -o myprogram -lprofiler
CPUPROFILE
=/tmp/profile ./myprogram

你可能感兴趣的:(gcc,profiler)