#debian7

apt-get install libunwind7 libunwind7-dev

wget https://code.google.com/p/gperftools/downloads/detail?name=gperftools-2.1.tar.gz

#gperftools-2.1.tar.gz 

tar xvf gperftools-2.1.tar.gz

cd gperftools-2.1

./configure

make

make install


打开 mysqld_safe 脚本 (默认在/usr/bin/mysqld_safe)

在此脚本文件开始加入

LD_PRELOAD="/usr/local/lib/libtcmalloc.so"



来自开源中国