Ubuntu12.04下使用valgrind内存测试工具测试Qt程序
1. 到官网http://valgrind.org/downloads/上下载valgrind最新版本;
2. 解压源码,执行./configure;make;make install后,默认安装到/usr/local/bin下,执行:
valgrind ls -l
3. 提示:
==== Memcheck, a memory error detector
==== Copyright (C) -, and GNU GPL'd, by Julian Seward et al.
==== Using Valgrind-3.7. and LibVEX; rerun with -h for copyright info
==== Command: ls -l
==== valgrind: Fatal error at startup: a function redirection
valgrind: which is mandatory for this platform-tool combination
valgrind: cannot be set up. Details of the redirection are:
valgrind:
valgrind: A must-be-redirected function
valgrind: whose name matches the pattern: strlen
valgrind: in an object with soname matching: ld-linux-x86-.so.
valgrind: was not found whilst processing
valgrind: symbols from the object with soname: ld-linux-x86-.so.
valgrind:
valgrind: Possible fixes: (, short term): install glibc's debuginfo
valgrind: package on this machine. (, longer term): ask the packagers
valgrind: for your Linux distribution to please in future ship a non-
valgrind: stripped ld.so (or whatever the dynamic linker .so is called)
valgrind: that exports the above-named function using the standard
valgrind: calling conventions for this platform. The package you need
valgrind: to install for fix () is called
valgrind:
valgrind: On Debian, Ubuntu: libc6-dbg
valgrind: On SuSE, openSuSE, Fedora, RHEL: glibc-debuginfo
valgrind:
valgrind: Cannot continue -- exiting now. Sorry.
大概是说我的glibc是个strip后的版本,需要下载debug版,debug版的名字是libc6-dbg。
执行:
sudo apt-get install libc6-dbg
4. 再次执行valgrind ls -l,输出:
==== Memcheck, a memory error detector
==== Copyright (C) -, and GNU GPL'd, by Julian Seward et al.
==== Using Valgrind-3.7. and LibVEX; rerun with -h for copyright info
==== Command: ls -l
====
total
drwxr-xr-x root root -- : bin
drwxr-xr-x root root -- : boot
drwxr-xr-x root root -- : cdrom
drwxr-xr-x root root -- : dev
drwxr-xr-x root root -- : etc
drwxr-xr-x root root -- : home
lrwxrwxrwx root root -- : initrd.img -> boot/initrd.img-2.6.--generic
drwxr-xr-x root root -- : lib
drwxr-xr-x root root -- : lib32
lrwxrwxrwx root root -- : lib64 -> /lib
drwx------ root root -- : lost+found
drwxr-xr-x root root -- : media
drwxr-xr-x root root -- : mnt
drwxr-xr-x root root -- : opt
dr-xr-xr-x root root -- : proc
drwx------ root root -- : root
drwxr-xr-x root root -- : sbin
drwxr-xr-x root root -- : selinux
drwxr-xr-x root root -- : srv
drwxr-xr-x root root -- : sys
drwxrwxrwx root root -- : tftpboot
drwxrwxrwt root root -- : tmp
drwxr-xr-x root root -- : usr
drwxr-xr-x root root -- : var
lrwxrwxrwx root root -- : vmlinuz -> boot/vmlinuz-2.6.--generic
drwxrwxrwx root root -- : work
====
==== HEAP SUMMARY:
==== in use at exit: , bytes in blocks
==== total heap usage: , allocs, , frees, , bytes allocated
====
==== LEAK SUMMARY:
==== definitely lost: bytes in blocks
==== indirectly lost: bytes in blocks
==== possibly lost: bytes in blocks
==== still reachable: , bytes in blocks
==== suppressed: bytes in blocks
==== Rerun with --leak-check=full to see details of leaked memory
====
==== For counts of detected and suppressed errors, rerun with: -v
==== ERROR SUMMARY: errors from contexts (suppressed: from )
看来ls这个命令是没有任何内存问题的。。。
Ubuntu12.04下使用valgrind内存测试工具测试Qt程序的更多相关文章
- ubuntu12.04下NFS链接开发板并测试交叉编译的第一个应用
思路:配置网络->安装NFS->配置NFS->挂载NFS服务->Down文件执行.Okay lets go! 配置网络: 在配置网络之前,首先咱得搞定与开发板的交互工作,那么这 ...
- Ubuntu10.04下安装Qt4和创建第一个Qt程序
1.首先安装Qt4并采用Qt Creator进行开发演示 (1)在Terminal中输入: sudo apt-get install qt4-dev-tools qt4-doc qt4-qtconfi ...
- Linux (Ubuntu12.04) 下开发工具安装和使用
Linux (Ubuntu12.04) 下开发工具安装和使用 这里讲述的是关于在ubuntu12.04下面安装和使用各种IDE 开发环境和初步使用的知识.说一下背景:很多的开发基本都是在linux操作 ...
- Ubuntu12.04下安ns-3.29及Ubuntu换源方法
目录 1.下载ns-3.29 2.安装gcc-4.9.2 3.编译.测试ns-3.29 第一种:更新,文章开头说的 第二种,更新源 主机型号:Ubuntu12.04 仿真环境版本:NS-3.29 安装 ...
- Ubuntu12.04下安装sourcenavigator-NG4.5阅读源代码
大家知道Windows下有一个很好的查看源代码的软件sourceinsight,使用sourceinsight查看Linux内核代码.嵌入式软件开发中的C语言项目源代码.驱动程序代码很是方便.在Lin ...
- 阿里云ubuntu12.04下安装使用mongodb
阿里云ubuntu12.04下安装mongodb apt-get install mongodb 阿里云ubuntu12.04下卸载mongodb,同时删除配置文件 apt-get pur ...
- 在ubuntu12.04下编译android4.1.2添加JNI层出现问题
tiny4412学习者,在ubuntu12.04下编译android4.1.2添加JNI层出现问题: (虚心请教解决方法) trouble writing output: Too many metho ...
- [置顶] ubuntu12.04下编译opencv程序
ubuntu12.04下编译opencv程序 1.在ubuntu下安装好 opencv后(建议使用apt-get install 来安装) 2.使用程序FaceExaple.c来进行测试程序 #inc ...
- Ubuntu12.04下Qt连接MySQL数据库
本文介绍在Ubuntu12.04 (64 bit) 下使用Qt 4.8.2连接MySQL(Ver 14.14 Distrib 5.5.43)数据库. 1.安装 Qt 和 MySQL 若未安装以上软件, ...
随机推荐
- asp.net 图片质量压缩(不改变尺寸)
private static ImageCodecInfo GetEncoderInfo(String mimeType) { int j; ImageCodecInfo[] encoders; en ...
- 03C#基础(2)
1.比较运算符 ==等于; !=不等于; >大于; >=大于或者等于; <小于; <=小于或者等于; 比较运算符(又称关系运算符)用来进行值得真假性判断,结果是boo ...
- jQuery选择器部分知识点总结
一.jQuery选择器的优势 1.使用CSS选择器时,开发人员需要考虑主流浏览器是否支持某些选择器,而在jQuery中,开发人员则可以放心的使用jQuery选择器而无需考虑浏览器是否支持这些选择器. ...
- JavaScript-学习一_var
JavaScript 数据类型 字符串(String).数字(Number).布尔(Boolean).数组(Array).对象(Object).空(Null).未定义(Undefined). < ...
- Css 描点
<!DOCTYPE HTML> <html lang="en-US"> <head> <meta charset="UTF-8& ...
- 如何搭建MVC3与配置models层
1.1 新建项目 第一步:打开Vs2010界面,点击左上角文件,点击新建,选择项目 1.1(图1) 第二步:点击网站Web类型,选择ASP.net MVC3 Web应用程序,在名称中输入项目名称(解决 ...
- bzoj2487: Super Poker II
Description I have a set of super poker cards, consisting of an infinite number of cards. For each p ...
- cms中if标签的使用
<#if order.EnFriendly ?? && order.EnFriendly==1> <td class="text-center"& ...
- Ant快速入门(三)-----定义生成文件
适应Ant的关键就是编写生成文件,生成文件定义了该项目的各个生成任务(以target来表示,每个target表示一个生成任务),并定义生成任务之间的依赖关系. Ant生成文件的默认名为build.xm ...
- STM8S学习笔记-时钟控制1
1.图13可见,STM8S单片机主要有四种时钟源可供选择: 1).1-24MHz外部晶体振荡器(HSE). 2).最大24MHz外部时钟(HSE ext). 3).16MHz高速内部RC振荡器(HSI ...