perftools的Tcmalloc加速

google-perftools这个工具可让开发创建更强大的应用程序,特别是那些用C++模版开发的多线程应用程序,包括TCMalloc, heap-checker, heap-profiler 和cpu-profiler。

1、安装libunwind(仅64位操作系统需要)
cd /usr/local/src/
wget
tar zxvf libunwind-0.99.tar.gz
cd libunwind-0.99
CFLAGS=-fPIC ./configure
make CFLAGS=-fPIC
make CFLAGS=-fPIC install

2、安装google-perftools
cd /usr/local/src/
wget
tar zvxf google-perftools-1.7.tar.gz
cd google-perftools-1.7
./configure
make && make install
echo “/usr/local/lib” > /etc/ld.so.conf.d/usr_local_lib.conf
/sbin/ldconfig

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:http://127.0.0.1/wyypxw.html