#!/bin/sh #set -x # just to make gdb<->bash easier PROG=../bin/spfquery/spfquery_static rm -f ./mtrace.out export MALLOC_TRACE=./mtrace.out export MALLOC_CHECK_=2 valgrind --leak-check=yes --show-reachable=yes $PROG "$@" mout=`mtrace $PROG mtrace.out 2>/dev/null` [ "$mout" != "No memory leaks." ] && echo "$mout"