diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2016-01-03 22:06:52 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2016-01-03 22:06:52 (GMT) |
commit | f017eb6fc09d74aa83eb5391028be5fd12380d34 (patch) | |
tree | d620ad36aebcac2abae7776518fa72db3c1d141a /src/H5MMprivate.h | |
parent | f8465bd1243d16783b4df44b40193d8f5137a781 (diff) | |
download | hdf5-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/H5MMprivate.h')
-rw-r--r-- | src/H5MMprivate.h | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/H5MMprivate.h b/src/H5MMprivate.h index 0d608b2..c494a60 100644 --- a/src/H5MMprivate.h +++ b/src/H5MMprivate.h @@ -21,8 +21,6 @@ * * Purpose: Private header for memory management. * - * Modifications: - * *------------------------------------------------------------------------- */ #ifndef _H5MMprivate_H @@ -33,7 +31,12 @@ /* Private headers needed by this file */ #include "H5private.h" +#if defined H5_MEMORY_ALLOC_SANITY_CHECK +/*#define H5MM_PRINT_MEMORY_STATS */ +#define H5MM_free(Z) H5MM_xfree(Z) +#else /* H5_MEMORY_ALLOC_SANITY_CHECK */ #define H5MM_free(Z) HDfree(Z) +#endif /* H5_MEMORY_ALLOC_SANITY_CHECK */ /* * Library prototypes... @@ -44,5 +47,9 @@ H5_DLL void *H5MM_realloc(void *mem, size_t size); 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_final_sanity_check(void); +#endif /* H5_MEMORY_ALLOC_SANITY_CHECK */ + +#endif /* _H5MMprivate_H */ -#endif |