Permalink
Fetching contributors…
Cannot retrieve contributors at this time
executable file 33 lines (27 sloc) 822 Bytes
#!/bin/bash
PREFIX="${CMAKE_INSTALL_PREFIX}"
if [ "x$MEMCACHED_UMEM" = "xyes" ]
then
export UMEM_DEBUG=default
export UMEM_LOGGING=transaction,contents,fail
export LD_PRELOAD=libumem.so.1
exec "$PREFIX/bin/memcached" "$@"
elif [ "x$MEMCACHED_WATCHMALLOC" = "xyes" ]
then
export MALLOC_DEBUG=WATCH,RW,STOP
export LD_PRELOAD=watchmalloc.so.1
exec "$PREFIX/bin/memcached" "$@"
elif [ "x$MEMCACHED_VALGRIND" = "xyes" ]
then
exec valgrind \
--time-stamp=yes \
--log-file=/tmp/memcached.%p.valgrind \
--leak-check=yes \
--track-origins=yes \
--read-var-info=yes \
--malloc-fill=55 \
--free-fill=aa \
--show-reachable=yes \
"$PREFIX/bin/memcached" -u `whoami` "$@"
fi
exec "$PREFIX/bin/memcached" "$@"