1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +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 <malloc.h>
#ifdef HAVE_VALGRIND
#include <valgrind.h>
#endif
#ifndef DEVMAPPER_SUPPORT
void memlock_inc_daemon(struct cmd_context *cmd)
@ -254,11 +258,12 @@ 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
* so we need to deactivate check of locked memory size
*/
if (RUNNING_ON_VALGRIND)
sz -= sz; /* = 0, but avoids getting warning about dead assigment */
#endif