diff options
Diffstat (limited to 'innobase/include/mem0mem.ic')
-rw-r--r-- | innobase/include/mem0mem.ic | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/innobase/include/mem0mem.ic b/innobase/include/mem0mem.ic index 8b8449469ef..edc3ab17f2a 100644 --- a/innobase/include/mem0mem.ic +++ b/innobase/include/mem0mem.ic @@ -170,7 +170,9 @@ mem_heap_alloc( buf = (byte*)buf + MEM_FIELD_HEADER_SIZE; #endif - +#ifdef UNIV_SET_MEM_TO_ZERO + memset(buf, '\0', n); +#endif return(buf); } @@ -494,8 +496,14 @@ mem_alloc_func( ) { #ifndef UNIV_MEM_DEBUG + void* buf; + + buf = mem_area_alloc(n, mem_comm_pool); - return(mem_area_alloc(n, mem_comm_pool)); +#ifdef UNIV_SET_MEM_TO_ZERO + memset(buf, '\0', n); +#endif + return(buf); #else |