valgrind检测内存,只有warning,请问是什么原因,怎么解决

一升米 2017-12-13 04:11:31
使用valgrind测试内存使用情况
valgrind --tool=memcheck --leak-check=full --track-origins=yes --leak-check=yes --show-reachable=yes --trace-children=yes ./test
结果如下,请问其中的两个warning是什么原因,如何查看是哪里导致的,我想解决掉它,谢谢
==24293== Memcheck, a memory error detector
==24293== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==24293== Using Valgrind-3.13.0 and LibVEX; rerun with -h for copyright info
==24293== Command: ./test
==24293==

==24293== Warning: set address range perms: large range [0x97a3f040, 0xa7cce682) (undefined)
==24293== Warning: set address range perms: large range [0x97a3f028, 0xa7cce69a) (noaccess)
run over and success
==24293==
==24293== HEAP SUMMARY:
==24293== in use at exit: 0 bytes in 0 blocks
==24293== total heap usage: 34,993,432 allocs, 34,993,432 frees, 971,529,503 bytes allocated
==24293==
==24293== All heap blocks were freed -- no leaks are possible
==24293==
==24293== For counts of detected and suppressed errors, rerun with: -v
==24293== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
...全文
548 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
jiht594 2017-12-15
  • 打赏
  • 举报
回复
https://stackoverflow.com/questions/13558067/what-does-this-valgrind-warning-mean-warning-set-address-range-perms 基本不用管
一升米 2017-12-15
  • 打赏
  • 举报
回复
里面就是==10222== Warning: set address range perms: large range [0x97a3f040, 0xa7cce682) (undefined) ==10222== Warning: set address range perms: large range [0x97a3f028, 0xa7cce69a) (noaccess)这两句,我再加哪些配置项能打印的全一些呢?谢谢各位大神了

69,371

社区成员

发帖
与我相关
我的任务
社区描述
C语言相关问题讨论
社区管理员
  • C语言
  • 花神庙码农
  • 架构师李肯
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧