【发布时间】:2016-08-07 21:23:55
【问题描述】:
当我尝试在一个非常简单的 hello_world.c 程序上运行 valgrind 时,我遇到了很多错误(大多数是相同功能的重复)。我问我的教授谁指出这些函数属于 C++。这是 valgrind 不完全支持 mac os 的问题吗?如果是,任何人都可以建议在 mac os 上替代 valgrind 吗?
==3766== by 0x7FFF5FC0853B: dyld::loadPhase5(char const*, char const*,
dyld::LoadContext const&, std::__1::vector<char const*,
std::__1::allocator<char const*> >*) (in /usr/lib/dyld)
==3766== by 0x7FFF5FC0853B: dyld::loadPhase5(char const*, char const*,
dyld::LoadContext const&, std::__1::vector<char const*,
std::__1::allocator<char const*> >*) (in /usr/lib/dyld)
==3766== HEAP SUMMARY:
==3766== in use at exit: 706,517 bytes in 906 blocks
==3766== total heap usage: 1,541 allocs, 635 frees, 1,282,197 bytes
allocated
==3766==
==3766== LEAK SUMMARY:
==3766== definitely lost: 5,713 bytes in 29 blocks
==3766== indirectly lost: 5,512 bytes in 24 blocks
==3766== possibly lost: 5,848 bytes in 127 blocks
==3766== still reachable: 43,570 bytes in 363 blocks
==3766== suppressed: 645,874 bytes in 363 blocks
==3766== Rerun with --leak-check=full to see details of leaked memory
【问题讨论】:
-
如果没有看到您的代码,就不可能肯定地说什么。我们所能做的就是猜测,而且猜测得不好。
-
另外,“要求我们推荐或查找书籍、工具、软件库、教程或其他场外资源的问题是题外话对于堆栈溢出..."。来自"What topics can I ask about here?" 的the help pages。