Skip to content

Commit

Permalink
Disable memory alloc sanity checks by default for Autotools debug builds
Browse files Browse the repository at this point in the history
  • Loading branch information
jhendersonHDF committed Mar 1, 2022
1 parent 80954e8 commit cfa7d6b
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -2710,9 +2710,11 @@ AC_ARG_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=yes if debug build, otherwise no]
This option may also cause issues with HDF5
filter plugins, so should not be enabled if
filters are to be used. This option is orthogonal
to the --enable-using-memchecker option.
[default=no]
])],
[MEMORYALLOCSANITYCHECK=$enableval])

Expand All @@ -2722,11 +2724,10 @@ AC_SUBST([MEMORYALLOCSANITYCHECK])

## Set default
if test "X-$MEMORYALLOCSANITYCHECK" = X- ; then
if test "X-$BUILD_MODE" = "X-debug" ; then
MEMORYALLOCSANITYCHECK=yes
else
MEMORYALLOCSANITYCHECK=no
fi
# Should consider enabling this option by default for
# 'developer' builds if that build mode is added in
# the future
MEMORYALLOCSANITYCHECK=no
fi

case "X-$MEMORYALLOCSANITYCHECK" in
Expand Down

0 comments on commit cfa7d6b

Please sign in to comment.