Commit 1792b300 authored by marko's avatar marko

branches/zip: mem_heap_block_free(): If innodb_use_sys_malloc is set,

do not tell Valgrind that the memory is free, to avoid
a bogus warning in Valgrind's built-in free() hook.
parent 50accfee
......@@ -475,14 +475,16 @@ mem_heap_block_free(
len = block->len;
block->magic_n = MEM_FREED_BLOCK_MAGIC_N;
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) {
......
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