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 若未安装以上软件, ...
随机推荐
- Linux硬盘命名和安装分区
硬盘命名: 硬盘命名基于文件,一般有如下文件方式: /dev/hda1 /dev/sdb3 具体含义如下: /dev:是所有设备文件存放的目录. hd和sd:他们是区别的前两个字母,代表该分区所在的设 ...
- IOS开发之UIScrollView
一.UIScrollView的边界处理问题: bounds属性: (1)当bounces属性设置为YES时,当UIScrollView中图片滑动到边界的时候会出现弹动的效果,就像是Linux中的果冻效 ...
- js学习笔记之:时间(二)
今天来了解一下js中定时器的两种用法.js中包括2种定时器,分别是: 间隔型定时器:setInterval(开) clearInterval (关) 延 ...
- android异常之emulator-arm.exe已停止工作
我遇到的这个问题通过降低了AVD的分辨率后解决了,估计是电脑的显卡不行.
- uva 10382 - Watering Grass(区域覆盖问题)
Sample Input 8 20 2 5 3 4 1 1 2 7 2 10 2 13 3 16 2 19 4 3 10 1 3 5 9 3 6 1 3 10 1 5 3 1 1 9 1 Sample ...
- iphone升级ios7之后出现蓝框框一直跳的问题
问题描述:iphone升级ios7之后出现蓝框框一直跳 解决办法:设置-通用-辅助功能-切换控制-里边打开了切换控制及自动扫描,直接关闭切换控制就好了
- UI基础 - UILabel
//根据文字获取size - (CGSize)getSizeWithstring:(NSString *)string { CGSize maxSize = CGSizeMake(320, 320); ...
- 「30天自制操作系统」 Stop & 「OS67 」 Start
废话 整个十月都没有再写一点什么, 其实没什么好写的, 把书里的东西码出来贴在博客里实在没什么意思, 况且书里已经写得够详细了. 这本书给我最深刻的感觉是, 作者通过简化一些细节, 一步一步地模拟整个 ...
- 转:开源项目学习方法ABC
文章来自于 http://yizhaolingyan.net/?p=123#comment-207 学习各种开源项目,已经成为很多朋友不可回避的工作内容了.笔者本人也是如此.在接触并学习了若干个开源项 ...
- UML问题
1.在创建协作图时需要先确定参与者,而协作图的工具栏里是没有Actor的,这是需要先new Actor,然后把其拖动到工作区:实验过程中发现必须创建在用例视图下,若是创建在逻辑试图下那么根本无法继续操 ...