summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/H5MM.c25
-rw-r--r--src/H5MMprivate.h1
2 files changed, 26 insertions, 0 deletions
diff --git a/src/H5MM.c b/src/H5MM.c
index b6e77eb..fd9a4a9 100644
--- a/src/H5MM.c
+++ b/src/H5MM.c
@@ -187,6 +187,31 @@ H5MM__sanity_check(void *mem)
/*-------------------------------------------------------------------------
+ * Function: H5MM_sanity_check_all
+ *
+ * Purpose: Sanity check all current memory allocations.
+ *
+ * Return: N/A (void)
+ *
+ * Programmer: Quincey Koziol
+ * Jan 5 2016
+ *
+ *-------------------------------------------------------------------------
+ */
+void
+H5MM_sanity_check_all(void)
+{
+ H5MM_block_t *curr;
+
+ curr = H5MM_block_head_s.next;
+ while(curr != &H5MM_block_head_s) {
+ H5MM__sanity_check_block(curr);
+ curr = curr->next;
+ } /* end while */
+} /* end H5MM_sanity_check_all() */
+
+
+/*-------------------------------------------------------------------------
* Function: H5MM_final_sanity_check
*
* Purpose: Final sanity checks on memory allocation.
diff --git a/src/H5MMprivate.h b/src/H5MMprivate.h
index c494a60..14bd28d 100644
--- a/src/H5MMprivate.h
+++ b/src/H5MMprivate.h
@@ -48,6 +48,7 @@ H5_DLL char *H5MM_xstrdup(const char *s);
H5_DLL char *H5MM_strdup(const char *s);
H5_DLL void *H5MM_xfree(void *mem);
#if defined H5_MEMORY_ALLOC_SANITY_CHECK
+H5_DLL void H5MM_sanity_check_all(void);
H5_DLL void H5MM_final_sanity_check(void);
#endif /* H5_MEMORY_ALLOC_SANITY_CHECK */