1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-03-10 16:58:47 +03:00

memlock: Do not check memory balance if RUNNING_ON_VALGRIND.

This commit is contained in:
Petr Rockai 2014-10-01 08:17:59 +02:00
parent d571eab3b2
commit 2a8dc7fb53

View File

@ -27,6 +27,10 @@
#include <sys/resource.h> #include <sys/resource.h>
#include <malloc.h> #include <malloc.h>
#ifdef HAVE_VALGRIND
#include <valgrind.h>
#endif
#ifndef DEVMAPPER_SUPPORT #ifndef DEVMAPPER_SUPPORT
void memlock_inc_daemon(struct cmd_context *cmd) void memlock_inc_daemon(struct cmd_context *cmd)
@ -254,12 +258,13 @@ static int _maps_line(const struct dm_config_node *cn, lvmlock_t lock,
} }
} }
#ifdef VALGRIND_POOL #ifdef HAVE_VALGRIND
/* /*
* Valgrind is continually eating memory while executing code * Valgrind is continually eating memory while executing code
* so we need to deactivate check of locked memory size * so we need to deactivate check of locked memory size
*/ */
sz -= sz; /* = 0, but avoids getting warning about dead assigment */ if (RUNNING_ON_VALGRIND)
sz -= sz; /* = 0, but avoids getting warning about dead assigment */
#endif #endif
*mstats += sz; *mstats += sz;