diff options
author | Vicențiu Ciorbaru <vicentiu@mariadb.org> | 2018-01-24 12:29:31 +0200 |
---|---|---|
committer | Vicențiu Ciorbaru <vicentiu@mariadb.org> | 2018-01-24 12:29:31 +0200 |
commit | d833bb65d53b9a4375fa71cc485b4719fdb0ee53 (patch) | |
tree | d1271339e1c3a660e4788a5c9913bfe54e0271f1 /storage/innobase/mem | |
parent | e431d90065d277e62fa4f81a1654790f58a84146 (diff) | |
parent | 76577e1e2602f3c30859a176808c433a263e1b0a (diff) | |
download | mariadb-git-d833bb65d53b9a4375fa71cc485b4719fdb0ee53.tar.gz |
Merge remote-tracking branch '5.5' into 10.0
Diffstat (limited to 'storage/innobase/mem')
-rw-r--r-- | storage/innobase/mem/mem0mem.cc | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/storage/innobase/mem/mem0mem.cc b/storage/innobase/mem/mem0mem.cc index e066aff5b30..b9f190509ee 100644 --- a/storage/innobase/mem/mem0mem.cc +++ b/storage/innobase/mem/mem0mem.cc @@ -1,6 +1,7 @@ /***************************************************************************** Copyright (c) 1994, 2011, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2018, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -506,13 +507,13 @@ mem_heap_block_free( #ifndef UNIV_HOTBACKUP if (!srv_use_sys_malloc) { #ifdef UNIV_MEM_DEBUG + UNIV_MEM_ALLOC(block, len); /* 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); + mem_erase_buf((byte*)block, len); #endif /* UNIV_MEM_DEBUG */ + UNIV_MEM_FREE(block, len); } if (type == MEM_HEAP_DYNAMIC || len < UNIV_PAGE_SIZE / 2) { @@ -526,13 +527,13 @@ mem_heap_block_free( } #else /* !UNIV_HOTBACKUP */ #ifdef UNIV_MEM_DEBUG + UNIV_MEM_ALLOC(block, len); /* 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); + mem_erase_buf((byte*)block, len); #endif /* UNIV_MEM_DEBUG */ + UNIV_MEM_FREE(block, len); ut_free(block); #endif /* !UNIV_HOTBACKUP */ } |