This page is intended to help developers/users understand how to best memory check their plugin using the popular tool valgrind. It is currently bare bones, and will be updated soon!

$ export PURPLE_LEAKCHECK_HELP=1
$ export G_SLICE=always-malloc
$ valgrind --tool=memcheck --leak-check=yes --leak-resolution=high --num-callers=20 --trace-children=no --child-silent-after-fork=yes --track-fds=yes pidgin -d >valgrind.log 2>&1

If valgrind supports it, add --track-origins=yes to the above. It makes diagnosing issues ridiculously easier.

Also consider using

$ valgrind ... pidgin -d 2>&1 | tee valgrind.log

instead of ">valgrind.log 2>&1", as you'll get visual feedback of what valgrind is doing.

Last modified 6 years ago Last modified on 02/07/11 13:52:59
All information, including names and email addresses, entered onto this website or sent to mailing lists affiliated with this website will be public. Do not post confidential information, especially passwords!