diff options
author | Michael Widenius <monty@askmonty.org> | 2010-05-26 22:27:01 +0300 |
---|---|---|
committer | Michael Widenius <monty@askmonty.org> | 2010-05-26 22:27:01 +0300 |
commit | 9e23495b1dc988526776768f50a30f647d793d14 (patch) | |
tree | 8f5166007a2603ef6cb45ddd08beca6b6da3a3fd /mysys/my_alloc.c | |
parent | 2d43ff67ddab70e6fb89682e201cb788c845e71e (diff) | |
download | mariadb-git-9e23495b1dc988526776768f50a30f647d793d14.tar.gz |
Added macros to inform valgrind that memory is uninitialized
include/Makefile.am:
Make my_valgrind.h global (as it's used by my_global.h)
include/my_global.h:
Include my_valgrind.h
include/my_sys.h:
TRASH() moved to my_valgrind.h
include/my_valgrind.h:
Add VALGRIND defines to mark memory
mysys/my_alloc.c:
Mark internal freed memory as undefined
Diffstat (limited to 'mysys/my_alloc.c')
-rw-r--r-- | mysys/my_alloc.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/mysys/my_alloc.c b/mysys/my_alloc.c index 32fc75fc692..8d3bc0c3fb2 100644 --- a/mysys/my_alloc.c +++ b/mysys/my_alloc.c @@ -21,7 +21,6 @@ #undef EXTRA_DEBUG #define EXTRA_DEBUG - /* Initialize memory root @@ -276,7 +275,7 @@ void *multi_alloc_root(MEM_ROOT *root, ...) DBUG_RETURN((void*) start); } -#define TRASH_MEM(X) TRASH(((char*)(X) + ((X)->size-(X)->left)), (X)->left) +#define TRASH_MEM(X) VALGRIND_MAKE_MEM_UNDEFINED(((char*)(X) + ((X)->size-(X)->left)), (X)->left) /* Mark all data in blocks free for reusage */ |