summaryrefslogtreecommitdiff
path: root/storage/innobase/mem
diff options
context:
space:
mode:
authorSatya B <satya.bn@sun.com>2009-10-16 17:28:02 +0530
committerSatya B <satya.bn@sun.com>2009-10-16 17:28:02 +0530
commitd63eb541f51648050467201ee4e148b087174ac6 (patch)
treed800c318519c4be386c9f5b47428b6790b8addb2 /storage/innobase/mem
parent12c7d0cf33b20dfcd548af594542b8a7bda601d2 (diff)
downloadmariadb-git-d63eb541f51648050467201ee4e148b087174ac6.tar.gz
Merging Innodb plugin 1.0.5 revisions from 5.1-main from revisions 3149 to 3163
also merged missing Innodb plugin revisions r5636,r5635 manually
Diffstat (limited to 'storage/innobase/mem')
-rw-r--r--storage/innobase/mem/mem0mem.c20
1 files changed, 15 insertions, 5 deletions
diff --git a/storage/innobase/mem/mem0mem.c b/storage/innobase/mem/mem0mem.c
index e0dc8716f13..ccb2fd8a7b4 100644
--- a/storage/innobase/mem/mem0mem.c
+++ b/storage/innobase/mem/mem0mem.c
@@ -475,16 +475,18 @@ mem_heap_block_free(
len = block->len;
block->magic_n = MEM_FREED_BLOCK_MAGIC_N;
+#ifndef UNIV_HOTBACKUP
+ if (!srv_use_sys_malloc) {
#ifdef UNIV_MEM_DEBUG
- /* In the debug version we set the memory to a random combination
- of hex 0xDE and 0xAD. */
+ /* In the debug version we set the memory to a random
+ combination of hex 0xDE and 0xAD. */
- mem_erase_buf((byte*)block, len);
+ mem_erase_buf((byte*)block, len);
#else /* UNIV_MEM_DEBUG */
- UNIV_MEM_ASSERT_AND_FREE(block, len);
+ UNIV_MEM_ASSERT_AND_FREE(block, len);
#endif /* UNIV_MEM_DEBUG */
-#ifndef UNIV_HOTBACKUP
+ }
if (type == MEM_HEAP_DYNAMIC || len < UNIV_PAGE_SIZE / 2) {
ut_ad(!buf_block);
@@ -495,6 +497,14 @@ mem_heap_block_free(
buf_block_free(buf_block);
}
#else /* !UNIV_HOTBACKUP */
+#ifdef UNIV_MEM_DEBUG
+ /* In the debug version we set the memory to a random
+ combination of hex 0xDE and 0xAD. */
+
+ mem_erase_buf((byte*)block, len);
+#else /* UNIV_MEM_DEBUG */
+ UNIV_MEM_ASSERT_AND_FREE(block, len);
+#endif /* UNIV_MEM_DEBUG */
ut_free(block);
#endif /* !UNIV_HOTBACKUP */
}