官网下载一个版本

Valgrind : Current Releases

下载解压安装

mkdir tools
cd tools
wget https://sourceware.org/pub/valgrind/valgrind-3.16.1.tar.bz2
tar -jxvf valgrind-3.16.1.tar.bz2
mv  valgrind-3.16.1 valgrind
cd valgrind
./autogen.sh
./configure --prefix=/root/temp/bin  # 改成自己的路径
make
make install

make的时候可能报这个错误
Valgrind工具使用

cd /usr/include;ln -s asm-generic asm; cd -

输出为日志

加上参数

--log-file=./file.log

内存泄露检查

参数

valgrind --tool=memcheck  --leak-check=full  --show-leak-kinds=all 可执行程序

相关文章:

  • 2022-01-16
  • 2021-10-09
  • 2021-04-24
  • 2021-09-14
  • 2022-02-05
  • 2021-11-20
  • 2021-11-27
  • 2022-12-23
猜你喜欢
  • 2021-04-12
  • 2022-01-16
  • 2022-01-17
  • 2021-10-24
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案