valgrind的安装及简单使用
官网下载:http://valgrind.org/downloads/current.html#current
tar -jxf valgrind-3.12.0.tar.bz2
cd valgrind-3.12.0
vim README
./autogen.sh
./configure --prefix=安装目录
make
make indstall
验证是否安装成功
cd 安装目录/bin
./valgrind ls -l
./valgrind –tool=memcheck –leak-check=full ./某某文件
可能的内存泄露(Possibly lost) 确定的内存泄露(Definitely lost)