summaryrefslogtreecommitdiff
path: root/storage/innobase/os/os0proc.c
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@oracle.com>2011-12-28 12:19:30 +0200
committerMarko Mäkelä <marko.makela@oracle.com>2011-12-28 12:19:30 +0200
commita290a8440367abbc6a29235d0f35cd52c139690f (patch)
treeb39e9c9103699570eac703c2cf8d7e14ff6a62dc /storage/innobase/os/os0proc.c
parent5e6ff79ac2751e1285edc7ad2508d3fe546d59d3 (diff)
downloadmariadb-git-a290a8440367abbc6a29235d0f35cd52c139690f.tar.gz
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
Diffstat (limited to 'storage/innobase/os/os0proc.c')
-rw-r--r--storage/innobase/os/os0proc.c33
1 files changed, 1 insertions, 32 deletions
diff --git a/storage/innobase/os/os0proc.c b/storage/innobase/os/os0proc.c
index f00475fc528..6092392616f 100644
--- a/storage/innobase/os/os0proc.c
+++ b/storage/innobase/os/os0proc.c
@@ -532,28 +532,6 @@ os_proc_get_number(void)
}
/********************************************************************
-Allocates non-cacheable memory. */
-
-void*
-os_mem_alloc_nocache(
-/*=================*/
- /* out: allocated memory */
- ulint n) /* in: number of bytes */
-{
-#ifdef __WIN__
- void* ptr;
-
- ptr = VirtualAlloc(NULL, n, MEM_COMMIT,
- PAGE_READWRITE | PAGE_NOCACHE);
- ut_a(ptr);
-
- return(ptr);
-#else
- return(ut_malloc(n));
-#endif
-}
-
-/********************************************************************
Allocates large pages memory. */
void*
@@ -561,9 +539,6 @@ os_mem_alloc_large(
/*===============*/
/* out: allocated memory */
ulint n, /* in: number of bytes */
- ibool set_to_zero, /* in: TRUE if allocated memory
- should be set to zero if
- UNIV_SET_MEM_TO_ZERO is defined */
ibool assert_on_error)/* in: if TRUE, we crash mysqld if
the memory cannot be allocated */
{
@@ -602,12 +577,6 @@ os_mem_alloc_large(
#endif
if (ptr) {
- if (set_to_zero) {
-#ifdef UNIV_SET_MEM_TO_ZERO
- memset(ptr, '\0', size);
-#endif
- }
-
return(ptr);
}
@@ -616,7 +585,7 @@ os_mem_alloc_large(
skip:
#endif /* HAVE_LARGE_PAGES */
- return(ut_malloc_low(n, set_to_zero, assert_on_error));
+ return(ut_malloc_low(n, assert_on_error));
}
/********************************************************************