貌似簡單的問題:「如何得知malloc/free 的呼叫次數?」 簡單的作法. 定義全域變數來紀錄: int malloc_count = 0, free_count = 0;. 透過巨集 #define MALLOC(x) do ...
確定! 回上一頁