valgrind 使用

Posted by shensunbo on December 17, 2025

install

1
sudo apt-get install valgrind

basic usage

1
valgrind --leak-check=full ./your_program
1
2
3
4
5
6
valgrind --leak-check=full \
         --show-leak-kinds=all \
         --track-origins=yes \
         --verbose \
         --log-file=valgrind-out.txt \
         bazel-bin/test/ceer/svm_test