From 4a1574c9981f53cce9fba12e79c843fdd0f5037d Mon Sep 17 00:00:00 2001 From: Leo Yuriev Date: Wed, 25 Mar 2015 21:28:58 +0300 Subject: [PATCH] all: refine #defines that controls memory checking. LDAP_DISABLE_MEMORY_CHECK removed, LDAP_MEMORY_DEBUG is used instead. LDAP_MEMORY_DEBUG_ASSERT replaced with LDAP_MEMORY_ASSERT. Change-Id: I0f43b9ae10b76c1af39f2c52b34b4ab804521e78 --- mdb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mdb.c b/mdb.c index a272f23f..45270d47 100644 --- a/mdb.c +++ b/mdb.c @@ -1816,7 +1816,7 @@ mdb_page_malloc(MDB_txn *txn, unsigned num) VALGRIND_MEMPOOL_ALLOC(env, np, size); } -#ifdef LDAP_MEMORY_DEBUG +#if LDAP_MEMORY_DEBUG > 0 memset(np, 42, size); #else if ((env->me_flags & MDB_NOMEMINIT) == 0) { @@ -2508,7 +2508,7 @@ search_done: txn->mt_next_pgno = pgno + num; } -#ifdef LDAP_MEMORY_DEBUG +#if LDAP_MEMORY_DEBUG > 0 memset(np, 111, env->me_psize * num); #endif VALGRIND_MAKE_MEM_UNDEFINED(np, env->me_psize * num);