UltraRogue: compile out the built-in memory checking.

Functions in memory.c tracked and instrumented memory allocation.  This
mechanism logged information to a text file and also added a 16KB guard
area to every allocation.  Neither of these are desirable in a multi-
user environment, so the whole memory tracking subsystem has been
disabled.

The behavior can be enabled with a configure flag, but it would be a
better idea to use Valgrind to deal with memory bugs.
This commit is contained in:
John "Elwin" Edwards 2017-11-24 13:22:26 -05:00
parent 359d0987a4
commit 1e2f3f5803
2 changed files with 35 additions and 0 deletions

View file

@ -158,4 +158,15 @@ AC_DEFINE([WIZARD], [], [Define to include wizard mode])
AC_MSG_RESULT([yes])
fi
AC_ARG_ENABLE([memdebug],[AC_HELP_STRING([--enable-memdebug], [enable built-in memory checking @<:@default=no@:>@])],[],[])
AC_MSG_CHECKING([if memory checking is enabled])
if test "x$enable_memdebug" = "xno" ; then
AC_MSG_RESULT([no])
elif test "x$enable_memdebug" = "x" ; then
AC_MSG_RESULT([no])
else
AC_DEFINE([MEM_DEBUG], [], [Define to enable built-in memory checking])
AC_MSG_RESULT([yes])
fi
AC_OUTPUT