diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1998-08-28 20:49:12 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1998-08-28 20:49:12 +0000 |
commit | c678653ff739ffa07de74fabc92eb54e7ffec8f4 (patch) | |
tree | 151bfefbd72bf5dd9b924483a00e0cbe8a6315e4 /lib | |
parent | e1be675f7330a1dec4500655d4b30171cebed55c (diff) |
do not toss memory dribble into the output files (small performance loss)
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libc/db/btree/bt_split.c | 4 | ||||
-rw-r--r-- | lib/libc/db/hash/hash_buf.c | 6 | ||||
-rw-r--r-- | lib/libc/db/mpool/mpool.c | 4 |
3 files changed, 3 insertions, 11 deletions
diff --git a/lib/libc/db/btree/bt_split.c b/lib/libc/db/btree/bt_split.c index 06f2eac5121..240af9349a1 100644 --- a/lib/libc/db/btree/bt_split.c +++ b/lib/libc/db/btree/bt_split.c @@ -35,7 +35,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: bt_split.c,v 1.4 1997/11/13 06:35:06 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: bt_split.c,v 1.5 1998/08/28 20:49:07 deraadt Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/types.h> @@ -390,9 +390,7 @@ bt_page(t, h, lp, rp, skip, ilen) mpool_put(t->bt_mp, r, 0); return (NULL); } -#ifdef PURIFY memset(l, 0xff, t->bt_psize); -#endif l->pgno = h->pgno; l->nextpg = r->pgno; l->prevpg = h->prevpg; diff --git a/lib/libc/db/hash/hash_buf.c b/lib/libc/db/hash/hash_buf.c index 8c1986e56b9..dc9631814d9 100644 --- a/lib/libc/db/hash/hash_buf.c +++ b/lib/libc/db/hash/hash_buf.c @@ -35,7 +35,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: hash_buf.c,v 1.5 1998/03/05 20:42:56 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: hash_buf.c,v 1.6 1998/08/28 20:49:10 deraadt Exp $"; #endif /* LIBC_SCCS and not lint */ /* @@ -180,16 +180,12 @@ newbuf(hashp, addr, prev_bp) /* Allocate a new one */ if ((bp = (BUFHEAD *)malloc(sizeof(BUFHEAD))) == NULL) return (NULL); -#ifdef PURIFY memset(bp, 0xff, sizeof(BUFHEAD)); -#endif if ((bp->page = (char *)malloc(hashp->BSIZE)) == NULL) { free(bp); return (NULL); } -#ifdef PURIFY memset(bp->page, 0xff, hashp->BSIZE); -#endif if (hashp->nbufs) hashp->nbufs--; } else { diff --git a/lib/libc/db/mpool/mpool.c b/lib/libc/db/mpool/mpool.c index 69d5fbadfc7..ab98c8e5c59 100644 --- a/lib/libc/db/mpool/mpool.c +++ b/lib/libc/db/mpool/mpool.c @@ -32,7 +32,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: mpool.c,v 1.4 1996/09/15 09:30:51 tholo Exp $"; +static char rcsid[] = "$OpenBSD: mpool.c,v 1.5 1998/08/28 20:49:11 deraadt Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/param.h> @@ -353,9 +353,7 @@ new: if ((bp = (BKT *)malloc(sizeof(BKT) + mp->pagesize)) == NULL) #ifdef STATISTICS ++mp->pagealloc; #endif -#if defined(DEBUG) || defined(PURIFY) memset(bp, 0xff, sizeof(BKT) + mp->pagesize); -#endif bp->page = (char *)bp + sizeof(BKT); ++mp->curcache; return (bp); |