valgrind ----直接使用参数

内存泄露:

sudo valgrind --tool=memcheck --leak-check=full --time-stamp=yes --max-threads=1000 --track-origins=yes --log-file=./valgrind_report_1000.log    a.out

多线程竞争:

sudo valgrind --tool=helgrind  --log-file=./valgrind_report_0906_mul_thread.log a.out

有时候,不小心知道了一些事,才发现自己所在乎的事是那么可笑。
原文地址:https://www.cnblogs.com/axjlxy/p/15240004.html