From 83f150c727f197c530d6f46a75b516eea52bed29 Mon Sep 17 00:00:00 2001 From: Andres Noetzli Date: Thu, 8 Feb 2018 18:36:12 -0800 Subject: Replace CMM flag with debug CMM flag, fix leak in debug CMM (#1586) Previously, we had -DCVC4_CONTEXT_MEMORY_MANAGER that needed to be added as a compile flag to use the context memory manager (which we want by default). This makes compiling with other build systems cumbersome because you have to know about the flag. This commit replaces the -DCVC4_CONTEXT_MEMORY_MANAGER flag with a -DCVC4_DEBUG_CONTEXT_MEMORY_MANAGER flag that does the opposite (in absence of the flag, we use the context memory manager). Additionally, the commit fixes a memory leak in the debug context memory manager (the destructor did not clean up the allocations). --- configure.ac | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 319b8d79f..ef12e4825 100644 --- a/configure.ac +++ b/configure.ac @@ -674,20 +674,20 @@ if test "$enable_valgrind" != no; then ]) fi -AC_MSG_CHECKING([whether to use the context memory manager]) +AC_MSG_CHECKING([whether to use the debug context memory manager]) -AC_ARG_ENABLE([context-memory-manager], - [AS_HELP_STRING([--disable-context-memory-manager], - [do not use the context memory manager])]) +AC_ARG_ENABLE([debug-context-memory-manager], + [AS_HELP_STRING([--enable-debug-context-memory-manager], + [use the debug context memory manager])]) -if test -z "${enable_context_memory_manager+set}"; then - enable_context_memory_manager=yes +if test -z "${enable_debug_context_memory_manager+set}"; then + enable_debug_context_memory_manager=no fi -AC_MSG_RESULT([$enable_context_memory_manager]) +AC_MSG_RESULT([$enable_debug_context_memory_manager]) -if test "$enable_context_memory_manager" = yes; then - CVC4CPPFLAGS="${CVC4CPPFLAGS:+$CVC4CPPFLAGS }-DCVC4_CONTEXT_MEMORY_MANAGER" +if test "$enable_debug_context_memory_manager" = yes; then + CVC4CPPFLAGS="${CVC4CPPFLAGS:+$CVC4CPPFLAGS }-DCVC4_DEBUG_CONTEXT_MEMORY_MANAGER" fi AC_MSG_CHECKING([whether to include statistics are turned on in libcvc4]) -- cgit v1.2.3