1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-31 22:22:30 +03:00

Bug#13418934 REMOVE HAVE_PURIFY DEPENDENCES FROM INNODB

InnoDB: Remove HAVE_purify, UNIV_INIT_MEM_TO_ZERO, UNIV_SET_MEM_TO_ZERO.

The compile-time setting HAVE_purify can mask potential bugs.
It is being set in PB2 Valgrind runs. We should simply get rid of it,
and replace it with UNIV_MEM_INVALID() to declare uninitialized memory
as such in Valgrind-instrumented binaries.

os_mem_alloc_large(), ut_malloc_low(): Remove the parameter set_to_zero.

ut_malloc(): Define as a macro that invokes ut_malloc_low().

buf_pool_init(): Never initialize the buffer pool frames. All pages
must be initialized before flushing them to disk.

mem_heap_alloc(): Never initialize the allocated memory block.

os_mem_alloc_nocache(), ut_test_malloc(): Unused function, remove.

rb:813 approved by Jimmy Yang
This commit is contained in:
Marko Mäkelä
2011-12-28 12:19:30 +02:00
parent 289af2579b
commit e498a1bf65
15 changed files with 16 additions and 302 deletions

View File

@@ -208,10 +208,6 @@ mem_heap_alloc(
caller */
buf = (byte*)buf + MEM_FIELD_HEADER_SIZE;
#endif
#ifdef UNIV_SET_MEM_TO_ZERO
UNIV_MEM_ALLOC(buf, n);
memset(buf, '\0', n);
#endif
UNIV_MEM_ALLOC(buf, n);
return(buf);