Always zap newly allocated pages, intead of conditional on PURIFY.
authorKen Raeburn <raeburn@mit.edu>
Fri, 13 Oct 2006 23:19:57 +0000 (23:19 +0000)
committerKen Raeburn <raeburn@mit.edu>
Fri, 13 Oct 2006 23:19:57 +0000 (23:19 +0000)
Minor performance penalty; c'est la vie.  Better to be able to run
purify or valgrind or whatever on the binaries we actually use.

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18698 dc483132-0cff-0310-8789-dd5450dbe970

src/plugins/kdb/db2/libdb2/btree/bt_split.c
src/plugins/kdb/db2/libdb2/mpool/mpool.c

index 0cc6cf09bca090a47568926564963d41737832d5..62ec823a18acbdd3a1ee5363ab915278fc4a3af7 100644 (file)
@@ -390,7 +390,7 @@ bt_page(t, h, lp, rp, skip, ilen)
                mpool_put(t->bt_mp, r, 0);
                return (NULL);
        }
-#ifdef PURIFY
+#if 1 /* def PURIFY */
        memset(l, 0xff, t->bt_psize);
 #endif
        l->pgno = h->pgno;
index c38388641ca98abb0b5c2142a66f44533b610bb8..56f2749a92a69362a7c0170611899f63f40b9e24 100644 (file)
@@ -393,7 +393,7 @@ new:        if ((bp = (BKT *)malloc(sizeof(BKT) + mp->pagesize)) == NULL)
 #ifdef STATISTICS
        ++mp->pagealloc;
 #endif
-#if defined(DEBUG) || defined(PURIFY)
+#if defined(DEBUG) || defined(PURIFY) || 1
        memset(bp, 0xff, sizeof(BKT) + mp->pagesize);
 #endif
        bp->page = (char *)bp + sizeof(BKT);