1
我已閱讀了無數關於此問題的問題,並且沒有任何答案有幫助。Valgrind沒有顯示行號
我不能發佈我的代碼,因爲太多了,但是我會提供我的makefile行和valgrind信息。我正在編譯gcc -std=c99 -Wall src/main.c src/filein.c src/make_game.c -g -O0 -Iinclude -o bin/rogue -lncurses
。
我這個Valgrind的運行:valgrind --leak-check=full /home/pi/rogue/rogue/bin/rogue assets/room.txt
我的輸出:
==2939== Memcheck, a memory error detector
==2939== Copyright (C) 2002-2011, and GNU GPL'd, by Julian Seward et al.
==2939== Using Valgrind-3.7.0 and LibVEX; rerun with -h for copyright info
==2939== Command: /home/pi/rogue/rogue/bin/rogue assets/room.txt
==2939==
==2939==
==2939== HEAP SUMMARY:
==2939== in use at exit: 117,855 bytes in 197 blocks
==2939== total heap usage: 306 allocs, 109 frees, 121,129 bytes allocated
==2939==
==2939== 900 bytes in 6 blocks are definitely lost in loss record 1 of 4
==2939== at 0x4835978: malloc (in /usr/lib/valgrind/vgpreload_memcheck-arm-linux.so)
==2939==
==2939== LEAK SUMMARY:
==2939== definitely lost: 900 bytes in 6 blocks
==2939== indirectly lost: 0 bytes in 0 blocks
==2939== possibly lost: 0 bytes in 0 blocks
==2939== still reachable: 116,955 bytes in 191 blocks
==2939== suppressed: 0 bytes in 0 blocks
==2939== Reachable blocks (those to which a pointer was found) are not shown.
==2939== To see them, rerun with: --leak-check=full --show-reachable=yes
==2939==
==2939== For counts of detected and suppressed errors, rerun with: -v
==2939== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 19 from 6)
這個輸出並不能幫助我的一切,我真的很感激,如果有人可以幫助。
我在我的pi上運行這個Valgrind,如何更新它?當我嘗試用'apt-get'升級它時,我被告知我有最新版本。 – MortalMan
針對上述情況,我嘗試通過從源代碼安裝來安裝valgrind,顯然我的體系結構不受支持。我無法在我的Pi或我的Mac上使用Valgrind ...很棒。 – MortalMan