Valgrind: memcheck of memleak/mem-uninitialization; massif usage
first install valgrind, its newest ver is 3.11, and stops updating since 2015/12.
in centos, yum installs 3.10 ver.
using valgrind ./buggy.out to execute memcheck tool in valgrind, other useful tools can be found in the man page.
specify --leak-check=full before program will print verbose info about mem-leak's malloc info.
however, valgrind only uses binary file to scan mem-errors, so something like buffer-overrun near the address will likely to be missed.
some said specify -fsanitize=address while compiling using gcc/ver 4.8 or clang will discover this problem(or clang 3.1+..), but seems not working too..
the --tool=exp-sgcheck checks buffer-overrun problems.. from this page..
Monitor heap-profiler: using massif tool:
valgrind --tool=massif ./prog.out will produce massive.out.pid file. Using ms_print massive.out.pid to print the result in graph style.
Valgrind: memcheck of memleak/mem-uninitialization; massif usage的更多相关文章
- 【转】 如何使用Valgrind memcheck工具进行C/C++的内存泄漏检测
系统编程中一个重要的方面就是有效地处理与内存相关的问题.你的工作越接近系统,你就需要面对越多的内存问题.有时这些问题非常琐碎,而更多时候它会演变成一个调试内存问题的恶梦.所以,在实践中会用到很多工具来 ...
- 如何使用Valgrind memcheck工具进行C/C++的内存泄漏检测
系统编程中一个重要的方面就是有效地处理与内存相关的问题.你的工作越接近系统,你就需要面对越多的内存问题.有时这些问题非常琐碎,而更多时候它会演变成一个调试内存问题的恶梦.所以,在实践中会用到很多工 ...
- valgrind memcheck使用方法及效果(转)
https://windmissing.github.io/linux/2016-02/valgrind-memcheck.html 一.valgrind 1. Valgrind是什么 Valgrin ...
- C/C++的内存泄漏检测工具Valgrind memcheck的使用经历
Linux下的Valgrind真是利器啊(不知道Valgrind的请自觉查看参考文献(1)(2)),帮我找出了不少C++中的内存管理错误,前一阵子还在纠结为什么VS 2013下运行良好的程序到了Lin ...
- Valgrind memcheck 8种错误实例
调不尽的内存泄漏,用不完的Valgrind Valgrind 安装 1. 到www.valgrind.org下载最新版valgrind-3.2.3.tar.bz2 2. 解压安装包:tar –jxvf ...
- 使用valgrind检查内存
Valgrind是运行在Linux上一套基于仿真技术的程序调试和分析工具,是公认的最接近Purify的产品,它包含一个内核——一个软件合成的CPU,和一系列的小工具,每个工具都可以完成一项任务——调试 ...
- Valgrind简单用法
Valgrind的主要作者Julian Seward刚获得了今年的Google-O'Reilly开源大奖之一──Best Tool Maker.让我们一起来看一下他的作品.Valgrind是运行在Li ...
- VALGRIND
系统编程中一个重要的方面就是有效地处理与内存相关的问题.你的工作越接近系统,你就需要面对越多的内存问题.有时这些问题非常琐碎,而更多时候它会演变成一个调试内存问题的恶梦.所以,在实践中会用到很多工具来 ...
- [转]Valgrind简单用法
[转]Valgrind简单用法 http://www.cnblogs.com/sunyubo/archive/2010/05/05/2282170.html Valgrind的主要作者Julian S ...
随机推荐
- Django之模型管理器filter处理问题
今天上班第一天,恭祝所有朋友新年快乐!! 最近在github上发现一个还不错的基于Django的开源博客项目,不过也许是版本原因,其中代码存在着些许问题,今天主要记录下其中的模型处理方法的部分. 这段 ...
- Eclipse主题设置
1. 内部编辑区域主题 Eclipse黑色主题包 下载主题包解压到Eclipse安装目录下的dropins目录,重启Eclipse,Windows—>Preferences—>Genera ...
- 记一次-angular-数字格式化
一个收费功能模块,需要做数据验证. input标签的ng-model的数据格式化 <input type="number" class="form-control& ...
- 【转】spring管理属性配置文件properties——使用PropertiesFactoryBean|spring管理属性配置文件properties——使用PropertyPlaceholderConfigurer
spring管理属性配置文件properties--使用PropertiesFactoryBean 对于属性配置,一般采用的是键值对的形式,如:key=value属性配置文件一般使用的是XXX.pr ...
- CocoaPods 报错 [!] The dependency `JSONModel (~> 1.2.0)` is not used in any concrete target.
当用CocoaPods pod install 时出现了下面的错误时: p.p1 { margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; col ...
- USACO 2.4 Cow Tours
Cow Tours Farmer John has a number of pastures on his farm. Cow paths connect some pastures with cer ...
- HDU 2181 哈密顿绕行世界问题
Problem Description 一个规则的实心十二面体,它的 20个顶点标出世界著名的20个城市,你从一个城市出发经过每个城市刚好一次后回到出发的城市. Input 前20行的第i行有3个数, ...
- 导入excel表格的数据--->到mysql中
01下载excel类,将Classes文件夹放入ThinkPHP\Extend\Vendor\位置 下载地址 http://phpexcel.codeplex.com/releases/view/26 ...
- csu oj Infected Computer 1427
#include <iostream> #include <algorithm> #include <stdio.h> #define max 20005 #def ...
- HTTP运行时与页面执行模型
注:本文为个人学习摘录,原文地址:http://www.cnblogs.com/stwyhm/archive/2006/08/09/471765.html HTTP运行时 HTTP运行期处理客户端应用 ...