summaryrefslogtreecommitdiffstats
path: root/src/H5.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5.c')
-rw-r--r--src/H5.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/H5.c b/src/H5.c
index 33ac340..a522398 100644
--- a/src/H5.c
+++ b/src/H5.c
@@ -396,6 +396,11 @@ H5_term_library(void)
(void)H5MM_free(tmp_open_stream);
} /* end while */
+#if defined H5_MEMORY_ALLOC_SANITY_CHECK
+ /* Sanity check memory allocations */
+ H5MM_final_sanity_check();
+#endif /* H5_MEMORY_ALLOC_SANITY_CHECK */
+
/* Reset flag indicating that the library is being shut down */
H5_TERM_GLOBAL = FALSE;
@@ -942,7 +947,6 @@ H5allocate_memory(size_t size, hbool_t clear)
ret_value = H5MM_malloc(size);
FUNC_LEAVE_API(ret_value)
-
} /* end H5allocate_memory() */
@@ -981,7 +985,6 @@ H5resize_memory(void *mem, size_t size)
ret_value = H5MM_realloc(mem, size);
FUNC_LEAVE_API(ret_value)
-
} /* end H5resize_memory() */
@@ -1004,10 +1007,9 @@ H5free_memory(void *mem)
H5TRACE1("e", "*x", mem);
/* At this time, it is impossible for this to fail. */
- HDfree(mem);
+ H5MM_xfree(mem);
FUNC_LEAVE_API(SUCCEED)
-
} /* end H5free_memory() */