C++内存检查工具valgrind
2017-08-01 15:01
441 查看
安装
apt-get install valgrind注意在Ubuntu 16.10上,需要python2为默认python版本。
运行
启动C++程序前加上valgrind即可。valgrind ./builder/bin/wind_tunnel_d -c ./config_pdc.js
检查报告
C-c C-c退出进程,可以看到如下报告:==16085== Memcheck, a memory error detector
==16085== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
==16085== Using Valgrind-3.12.0.SVN and LibVEX; rerun with -h for copyright info
==16085== Command: ./builder/bin/wind_tunnel_d -c ./config_pdc.js
==16085==
C-c C-c==16085==
==16085== HEAP SUMMARY:
==16085== in use at exit: 56,708 bytes in 206 blocks
==16085== total heap usage: 553,865 allocs, 553,659 frees, 35,269,883 bytes allocated
==16085==
==16085== LEAK SUMMARY:
==16085== definitely lost: 0 bytes in 0 blocks
==16085== indirectly lost: 0 bytes in 0 blocks
==16085== possibly lost: 0 bytes in 0 blocks
==16085== still reachable: 56,708 bytes in 206 blocks
==16085== of which reachable via heuristic:
==16085== newarray : 14,440 bytes in 29 blocks
==16085== suppressed: 0 bytes in 0 blocks
==16085== Rerun with --leak-check=full to see details of leaked memory
==16085==
==16085== For counts of detected and suppressed errors, rerun with: -v
==16085== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
相关文章推荐
- linux c c++内存检查工具valgrind的使用
- [C++] 内存泄漏检查工具 Valgrind
- 如何使用Valgrind内存检查工具 检查C/C++中内存泄露
- 内存泄漏检查工具valgrind使用方法
- C/C++内存泄露检测工具 valgrind
- Linux下几款C++程序中的内存泄露检查工具
- Valgrind内存泄漏和内存越界访问检查工具
- linux下内存检查工具valgrind使用方法
- valgrind--CPP程序内存泄露检查工具
- Linux下几款C++程序中的内存泄露检查工具
- linux高级工具命令(四)valgrind做内存检查
- Linux下代码内存泄露检查工具valgrind
- php 内存泄露检查工具valgrind
- 内存检查工具Valgrind
- 【C/C++ 语法备忘】2、内存泄露检查工具VLD
- 推荐一个C++内存泄露检查工具
- Linux下几款C++程序中的内存泄露检查工具
- 内存检查工具Valgrind介绍
- Linux 内存泄露检查工具valgrind
- 超强内存泄露检查工具valgrind