linux实用技巧用valgrind做内存检查(内存泄露等)
来源: 作者: 发布时间:2007-10-09
==4285== Using LibVEX rev 1606, a library for dynamic binary translation.
==4285== Copyright (C) 2004-2006, and GNU GPL'd, by OpenWorks LLP.
==4285== Using valgrind-3.2.0, a dynamic binary instrumentation framework.
==4285== Copyright (C) 2000-2006, and GNU GPL'd, by Julian Seward et al.
==4285== For more details, rerun with: -v
==4285==
==4285== Conditional jump or move depends on uninitialised value(s)
==4285== at 0x8048372: foo (test2.c:5)
==4285== by 0x80483B4: main (test2.c:16)
==4285==p p
==4285== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 12 from 1)
==4285== malloc/free: in use at exit: 0 bytes in 0 blocks.
==4285== malloc/free: 0 allocs, 0 frees, 0 bytes allocated.
==4285== For counts of detected errors, rerun with: -v
==4285== All heap blocks were freed -- no leaks are possible.
从这份报告可以看出进程PID是4285,test2.c文件的第16行调用了foo函数,在test2.c文件的第5行foo函数使用了一个未初始化的变量。
valgrind还有很多使用选项,具体可以查看valgrind的man手册页和valgrind官方网站的在线文档。
共5页:
上一页 [1] [2] [3] [4] 5 下一页
如果你想咨询课程、学费、就业、开班等情况!请拨打我们的咨询热线0371-66252525 ! 或者点击QQ、右侧的图标与我们在线老师咨询!
|
开班信息
| 班级 |
类型 |
状态 |
| YS113 |
周末班 |
热招 |
| TS137 |
专修班 |
热招 |
| YS112 |
周末班 |
热招 |
| TS136 |
专修班 |
余7座 |
| YS111 |
周末班 |
余4座 |
| TS135 |
专修班 |
余1座 |
| TS134 |
专修班 |
已满 |
免费讲座
时间: 1月11日(本周日)14:00
内容:"黑客攻防"
"专家讲解职业规划"
抢座热线:0371-66252525
电话抢座 名额有限
|
徐保金学 历:大专
就职单位:金业集团
岗 位:网络工程师
我是一名07年普通大专毕业的学生,毕业后心里很不踏实,对自己的前...
>>详情
于江
毕业学校:天津大学
专 业:工学硕士
教学理念:晓之以理,动之以情,导之以行,持之以恒...
>>详情
|
青鸟大事
|
- 北大青鸟电话:0371-66252525
- 教质服务热线:15890063901
- 夜间咨询热线:13676985050
|
|
|