diff urogue/configure.ac @ 288:b8919055c2fc

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.
author John "Elwin" Edwards
date Fri, 24 Nov 2017 13:22:26 -0500
parents 0b3d1b38998f
children fe6b7a1a6dfc
line wrap: on
line diff
--- a/urogue/configure.ac	Mon Oct 16 19:53:38 2017 -0400
+++ b/urogue/configure.ac	Fri Nov 24 13:22:26 2017 -0500
@@ -158,4 +158,15 @@
 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