24#ifndef DUMUX_VALGRIND_HH
25#define DUMUX_VALGRIND_HH
26#warning "This header is deprecated and will be removed after release 3.3"
31bool boolBlubb(
bool value) {
return value; }
34#define SetUndefined(t) voidBlubb()
35#define SetDefined(t) voidBlubb()
36#define CheckDefined(t) boolBlubb(true)
37#define SetNoAccess(t) voidBlubb()
38#define Running() boolBlubb(false)
42#include <valgrind/memcheck.h>
52#if !defined NDEBUG && HAVE_VALGRIND
53 return RUNNING_ON_VALGRIND;
75#if !defined NDEBUG && HAVE_VALGRIND
76 unsigned int tmp = VALGRIND_CHECK_MEM_IS_DEFINED(&value,
sizeof(T));
86#if !defined NDEBUG && HAVE_VALGRIND
87 unsigned int tmp = VALGRIND_CHECK_MEM_IS_DEFINED(value, size*
sizeof(T));
105#if !defined NDEBUG && HAVE_VALGRIND
106 VALGRIND_MAKE_MEM_UNDEFINED(&value,
sizeof(T));
113#if !defined NDEBUG && HAVE_VALGRIND
114 VALGRIND_MAKE_MEM_UNDEFINED(value, size*
sizeof(T));
129#if !defined NDEBUG && HAVE_VALGRIND
130 VALGRIND_MAKE_MEM_DEFINED(&value,
sizeof(T));
137#if !defined NDEBUG && HAVE_VALGRIND
138 VALGRIND_MAKE_MEM_DEFINED(value, n*
sizeof(T));
153#if !defined NDEBUG && HAVE_VALGRIND
154 VALGRIND_MAKE_MEM_NOACCESS(&value,
sizeof(T));
161#if !defined NDEBUG && HAVE_VALGRIND
162 VALGRIND_MAKE_MEM_NOACCESS(value, n*
sizeof(T));
bool CheckDefined(const T &value)
Make valgrind complain if the object occupied by an object is undefined.
Definition: valgrind.hh:73
bool Running()
Returns whether the program is running under Valgrind or not.
Definition: valgrind.hh:50
void SetDefined(const T &value)
Make the memory on which an object resides defined.
Definition: valgrind.hh:127
void SetUndefined(const T &value)
Make the memory on which an object resides undefined.
Definition: valgrind.hh:103
void SetNoAccess(const T &value)
Make valgrind complain if an object's memory is accessed.
Definition: valgrind.hh:151
Definition: valgrind.hh:45