Tuesday, October 23, 2012

Valgrind


http://valgrind.org/docs/manual/mc-manual.html


1. Just put valgrind in front of your command:

# valgrind /ABC/abc


2. If your command call by others , then you can valgrind it inderectly...

# cat abc.sh

#!/bin/sh
valgrindlog="valgrindlog"`date +%m%d%H%M%S`
valgrind /ABC/abc $* 2>&1 | tee $valgrindlog

# link abc.sh abc
# chmod +x abc.sh

No comments:

Related Posts Plugin for WordPress, Blogger...