summaryrefslogtreecommitdiff
path: root/mysys
diff options
context:
space:
mode:
authorunknown <monty@hundin.mysql.fi>2002-10-16 16:34:29 +0300
committerunknown <monty@hundin.mysql.fi>2002-10-16 16:34:29 +0300
commit6f38e3083f0d867af8d1499fba92c7eaae295726 (patch)
tree7e8b3a279aef52d26da9843f1c45ff38112391f2 /mysys
parent266e42b24cf1837cde602811dccf63e0395bbe5c (diff)
parent7013d8ef0ae0a21fadfcc0a159ee1d83fdad8a9d (diff)
downloadmariadb-git-6f38e3083f0d867af8d1499fba92c7eaae295726.tar.gz
Merge work:/home/bk/mysql-4.0 into hundin.mysql.fi:/my/bk/mysql-4.0
BitKeeper/etc/logging_ok: auto-union sql/mysqld.cc: Auto merged
Diffstat (limited to 'mysys')
-rw-r--r--mysys/safemalloc.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/mysys/safemalloc.c b/mysys/safemalloc.c
index 2b990448b08..89079fba31c 100644
--- a/mysys/safemalloc.c
+++ b/mysys/safemalloc.c
@@ -201,9 +201,7 @@ gptr _mymalloc (uint uSize, const char *sFile, uint uLine, myf MyFlags)
pthread_mutex_unlock(&THR_LOCK_malloc);
/* Set the memory to the aribtrary wierd value */
-#ifdef HAVE_purify
- if (MyFlags & MY_ZEROFILL)
-#endif
+ if ((MyFlags & MY_ZEROFILL) || !sf_malloc_quick)
bfill(&pTmp -> aData[sf_malloc_prehunc],uSize,
(char) (MyFlags & MY_ZEROFILL ? 0 : ALLOC_VAL));
/* Return a pointer to the real data */
@@ -321,7 +319,8 @@ void _myfree (gptr pPtr, const char *sFile, uint uLine, myf myflags)
#ifndef HAVE_purify
/* Mark this data as free'ed */
- bfill(&pRec->aData[sf_malloc_prehunc],pRec->uDataSize,(pchar) FREE_VAL);
+ if (!sf_malloc_quick)
+ bfill(&pRec->aData[sf_malloc_prehunc],pRec->uDataSize,(pchar) FREE_VAL);
#endif
*((long*) ((char*) &pRec -> lSpecialValue+sf_malloc_prehunc)) = ~MAGICKEY;