Valgrind是輸出如下: ==14446== 2,976 (176 direct, 2,800 indirect) bytes in 2 blocks are definitely lost in loss record 23 of 33
==14446== at 0x4C2506C: operator new(unsigned long) (in /usr/lib64/valgrind/a
我需要檢測我的Makefile是否在valgrind下運行(間接地,使用valgrind --trace-children = yes),我知道如何從C中執行它,但我還沒有找到一種方法來從腳本執行它, 以前的答案僅適用於Linux。對於Mac OS X,我將在環境中grep for VALGRIND_STARTUP_PWD,除非有人有更好的主意。