summaryrefslogtreecommitdiff
path: root/storage/innobase/mem/mem0dbg.c
diff options
context:
space:
mode:
Diffstat (limited to 'storage/innobase/mem/mem0dbg.c')
-rw-r--r--storage/innobase/mem/mem0dbg.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/storage/innobase/mem/mem0dbg.c b/storage/innobase/mem/mem0dbg.c
index 419f410cf1b..eb77dd01f6d 100644
--- a/storage/innobase/mem/mem0dbg.c
+++ b/storage/innobase/mem/mem0dbg.c
@@ -66,7 +66,6 @@ mem_hash_get_nth_cell(ulint i)
return(&(mem_hash_table[i]));
}
-#endif /* UNIV_MEM_DEBUG */
/* Accessor functions for a memory field in the debug version */
@@ -106,6 +105,7 @@ mem_field_trailer_get_check(byte* field)
return(mach_read_from_4(field
+ mem_field_header_get_len(field)));
}
+#endif /* UNIV_MEM_DEBUG */
/**********************************************************************
Initializes the memory system. */
@@ -136,6 +136,7 @@ mem_init(
mem_comm_pool = mem_pool_create(size);
}
+#ifdef UNIV_MEM_DEBUG
/**********************************************************************
Initializes an allocated memory field in the debug version. */
@@ -163,7 +164,6 @@ mem_field_init(
mem_field_header_set_check(usr_buf, rnd);
mem_field_trailer_set_check(usr_buf, rnd);
-#ifdef UNIV_MEM_DEBUG
/* Update the memory allocation information */
mutex_enter(&mem_hash_mutex);
@@ -182,7 +182,6 @@ mem_field_init(
combination of 0xBA and 0xBE */
mem_init_buf(usr_buf, n);
-#endif /* UNIV_MEM_DEBUG */
}
/**********************************************************************
@@ -199,7 +198,6 @@ mem_field_erase(
usr_buf = buf + MEM_FIELD_HEADER_SIZE;
-#ifdef UNIV_MEM_DEBUG
mutex_enter(&mem_hash_mutex);
mem_current_allocated_memory -= n;
mutex_exit(&mem_hash_mutex);
@@ -211,10 +209,8 @@ mem_field_erase(
combination of 0xDE and 0xAD */
mem_erase_buf(buf, MEM_SPACE_NEEDED(n));
-#endif /* UNIV_MEM_DEBUG */
}
-#ifdef UNIV_MEM_DEBUG
/*******************************************************************
Initializes a buffer to a random combination of hex BA and BE.
Used to initialize allocated memory. */
@@ -376,6 +372,7 @@ mem_hash_remove(
}
#endif /* UNIV_MEM_DEBUG */
+#if defined UNIV_MEM_DEBUG || defined UNIV_DEBUG
/*******************************************************************
Checks a memory heap for consistency and prints the contents if requested.
Outputs the sum of sizes of buffers given to the user (only in
@@ -549,10 +546,12 @@ completed:
}
*error = FALSE;
}
+#endif /* UNIV_MEM_DEBUG || UNIV_DEBUG */
+#ifdef UNIV_DEBUG
/******************************************************************
Prints the contents of a memory heap. */
-
+static
void
mem_heap_print(
/*===========*/
@@ -615,6 +614,7 @@ mem_heap_validate(
return(TRUE);
}
+#endif /* UNIV_DEBUG */
#ifdef UNIV_MEM_DEBUG
/*********************************************************************