summaryrefslogtreecommitdiffstats
path: root/src/H5.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2016-01-03 22:06:52 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2016-01-03 22:06:52 (GMT)
commitf017eb6fc09d74aa83eb5391028be5fd12380d34 (patch)
treed620ad36aebcac2abae7776518fa72db3c1d141a /src/H5.c
parentf8465bd1243d16783b4df44b40193d8f5137a781 (diff)
downloadhdf5-f017eb6fc09d74aa83eb5391028be5fd12380d34.zip
hdf5-f017eb6fc09d74aa83eb5391028be5fd12380d34.tar.gz
hdf5-f017eb6fc09d74aa83eb5391028be5fd12380d34.tar.bz2
[svn-r28777] Description:
Add --enable-memory-alloc-sanity-check option to configure, to track and sanity check memory allocations within the library. This is orthogonal to the --enable-using-memchecker option and can be used with/without it. Tested on: MacOSX/64 10.11.2 (amazon) w/serial & parallel (h5committest forthcoming)
Diffstat (limited to 'src/H5.c')
-rw-r--r--src/H5.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/H5.c b/src/H5.c
index 2086ce8..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;