Skip to content
Snippets Groups Projects
Commit 493d4d70 authored by Ansgar Burchardt's avatar Ansgar Burchardt Committed by Oliver Sander
Browse files

m4/system_heap.m4: Use system heap by default.

parent 2568eeea
No related branches found
No related tags found
No related merge requests found
dnl This macro introduces a configure flag --enable-system-heap.
dnl If set UG takes it memory through malloc/free instead of using
dnl the custom heap data structures in low/heaps.c.
dnl This macro introduces a configure flag --disable-system-heap.
dnl If set, UG uses a custom heap data structure in low/heaps.c instead
dnl of taking its memory through malloc/free.
dnl
dnl Using the system heap has several advantages:
dnl - there is no artificial upper bound to the amount of memory UG can use
......@@ -8,12 +8,10 @@ dnl - valgrind may see more bugs
dnl
dnl The system heap may also be faster, but it may also be slower.
dnl No way to know without measuring.
dnl
dnl Since this is an experimental feature it is switched off by default
AC_DEFUN([UG_ENABLE_SYSTEM_HEAP],[
AC_ARG_ENABLE(system-heap,
AS_HELP_STRING([--enable-system-heap],[If this is set, the operating system heap is used instead of UG's own heap data structure.]))
AS_HELP_STRING([--disable-system-heap],[If this is set, UG's own heap data structure is used instead of the operating system heap.], [], [enable_system_heap=yes]))
AS_IF([test "x$enable_system_heap" = "xyes"],
AC_DEFINE(UG_USE_SYSTEM_HEAP, 1, [If this is set, the operating system heap is used instead of UG's own heap data structure.]))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment