summaryrefslogtreecommitdiffstats
path: root/configure.ac
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 /configure.ac
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 'configure.ac')
-rw-r--r--configure.ac31
1 files changed, 31 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 0e853a8..9c1d5b0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2044,6 +2044,8 @@ AC_ARG_ENABLE([using-memchecker],
library. Enabling this causes the library to be
more picky about it's memory operations and also
disables the library's free space manager code.
+ This option is orthogonal to the
+ --enable-memory-alloc-sanity-check option.
Default=no.])],
[USINGMEMCHECKER=$enableval])
@@ -2062,6 +2064,35 @@ case "X-$USINGMEMCHECKER" in
;;
esac
+## ----------------------------------------------------------------------
+## Check if they would like to enable the internal memory allocation sanity
+## checking code.
+##
+AC_SUBST([MEMORYALLOCSANITYCHECK])
+AC_MSG_CHECKING([whether internal memory allocation sanity checking is used])
+AC_ARG_ENABLE([memory-alloc-sanity-check],
+ [AS_HELP_STRING([--enable-memory-alloc-sanity-check],
+ [Enable this option to turn on internal memory
+ allocation sanity checking. This could cause
+ more memory use and somewhat slower allocation.
+ This option is orthogonal to the
+ --enable-using-memchecker option.
+ Default=no.])],
+ [MEMORYALLOCSANITYCHECK=$enableval])
+
+case "X-$MEMORYALLOCSANITYCHECK" in
+ X-yes)
+ MEMORYALLOCSANITYCHECK=yes
+ AC_MSG_RESULT([yes])
+ AC_DEFINE([MEMORY_ALLOC_SANITY_CHECK], [1],
+ [Define to enable internal memory allocation sanity checking.])
+ ;;
+ *)
+ MEMORYALLOCSANITYCHECK=no
+ AC_MSG_RESULT([no])
+ ;;
+esac
+
## Checkpoint the cache
AC_CACHE_SAVE