最近需要优化内存分配的效率和速度, 加上Nginx的使用, 所以选择了Google Perftools这个工具. 现在把安装过程详细列出来:
1. 由于google被墙, 所以选择用git下载源码:
git clone https://github.com/gperftools/gperftools
2. 进入gperftools目录:
cd gperftools
3. 需要安装必要的包 automake, autoconf, libtool和libunwind
查找libunwind
yum search libunwind
然后选择libunwind-dev相同或相似的开发者包
4. 查阅INSTALL, 里面有这么一段
But, in order to build gperftools checked out from subversion |
repository you need to have autoconf, automake and libtool |
installed. And before running ./configure you have to generate it (and |
a bunch of other files) by running ./autogen.sh script. That script |
所以,我们需要先运行 ./autogen 来生成 ./configure
4. 接下来就是传统的Linux安装三板斧:
./configure
make
make install
(配置和使用更新中)