當我嘗試在一個非常簡單的hello_world.c程序上運行valgrind時,出現了很多錯誤(大多數是重複相同的函數)。我問我的教授誰指出這些功能屬於C++。這是valgrind不完全支持mac os的問題嗎?如果是的話,任何人都可以在mac os上建議valgrind的替代方案嗎?在mac os 10.11上運行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
沒有看到你的代碼,它是*不可能*說一定的東西。我們所能做的只是猜測,而且猜測不好。 –
此外,「要求我們推薦或找到一本書,**工具**,軟件庫,教程或其他非本地資源*的問題都是堆棧溢出問題。」。從[「我可以詢問哪些主題?」](http://stackoverflow.com/help/on-topic)[幫助頁面](http://stackoverflow.com/help)。 –