File: memcheck

package info (click to toggle)
diod 1.0.13-3
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 29,952 kB
  • sloc: ansic: 31,694; sh: 15,368; makefile: 347; perl: 80
file content (15 lines) | stat: -rwxr-xr-x 335 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/bash

if [ $# -eq 0 ]; then
    echo "Usage: memcheck prog [args...]" >&2
    exit 1
fi

opt_gensupp='--gen-suppressions=all'
if which valgrind >/dev/null 2>&1; then
    valgrind --error-exitcode=1 --tool=memcheck --leak-check=yes --quiet \
             --suppressions=./valgrind.supp $*
else
    export MALLOC_CHECK_=3; $*
fi