在64位contos上安装内存池(Memory Pool) tcmalloc

1,安装tcmalloc所需的libunwind库[64位系统需要安装,32位系统无需安装]

wget http://download.savannah.gnu.org/releases/libunwind/libunwind-0.99-alpha.tar.gz
tar zxvf libunwind-0.99-alpha.tar.gz
cd libunwind-0.99-alpha/
CFLAGS=-fPIC ./configure
make CFLAGS=-fPIC
make CFLAGS=-fPIC install

2,安装tcmalloc

wget http://gperftools.googlecode.com/files/gperftools-2.0.tar.gz
tar zxvf google-perftools-0.97.tar.gz
cd google-perftools-0.97/
./configure
make && make install
默认安装时,libunwind与tcmalloc库均安装至/usr/local/lib

3,配置动态连接库

echo "/usr/local/lib" > /etc/ld.so.conf.d/usr_local_lib.conf

/sbin/ldconfig

使用:增加编译选项  -ltcmalloc 

你可能感兴趣的:(在64位contos上安装内存池(Memory Pool) tcmalloc)