Commit cc305b73 authored by sunny's avatar sunny

branches/zip: When building HotBackup srv_use_sys_malloc is #ifdef out. We

move access to the this variable within a !UNIV_HOTBACKUP block.
parent 8fdf0e48
......@@ -475,6 +475,7 @@ 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
......@@ -484,9 +485,8 @@ mem_heap_block_free(
#else /* UNIV_MEM_DEBUG */
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);
......@@ -497,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 */
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment