summaryrefslogtreecommitdiffstats
path: root/src/configure.ac
diff options
context:
space:
mode:
authorDave Barach <dave@barachs.net>2018-07-04 10:56:23 -0400
committerDamjan Marion <dmarion@me.com>2018-07-18 12:09:42 +0000
commit6a5adc369591fcac2447e9809deaa22f56b53911 (patch)
treec9a56b1ed0d5e8eb2f21a843552c6c0bc6df5597 /src/configure.ac
parent2a3fb1a28b170ac1d37815983611e83d148811d4 (diff)
Add config option to use dlmalloc instead of mheap
Configure w/ --enable-dlmalloc, see .../build-data/platforms/vpp.mk src/vppinfra/dlmalloc.[ch] are slightly modified versions of the well-known Doug Lea malloc. Main advantage: dlmalloc mspaces have no inherent size limit. Change-Id: I19b3f43f3c65bcfb82c1a265a97922d01912446e Signed-off-by: Dave Barach <dave@barachs.net>
Diffstat (limited to 'src/configure.ac')
-rw-r--r--src/configure.ac5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/configure.ac b/src/configure.ac
index 1e92e9ca49f..8830c68deff 100644
--- a/src/configure.ac
+++ b/src/configure.ac
@@ -190,6 +190,7 @@ ENABLE_ARG(tests, [Enable unit tests])
ENABLE_ARG(dpdk_shared, [Enable unit tests])
ENABLE_ARG(perftool, [Enable perftool])
ENABLE_ARG(g2, [Enable g2])
+ENABLE_ARG(dlmalloc, [Enable dlmalloc])
# --disable-X
DISABLE_ARG(vlib, [Disable vlib and dependant libs and binaries])
@@ -232,6 +233,8 @@ AC_ARG_WITH(pre-data,
*) with_pre_data="pre-data-not-set" ;;
esac], [with_pre_data=128])
+AM_CONDITIONAL(ENABLE_DLMALLOC, test "$enable_dlmalloc" = "yes")
+
###############################################################################
# Target CPU flags
###############################################################################
@@ -278,6 +281,7 @@ AS_IF([test "$cc_flag_check" = yes],
AC_SUBST(PRE_DATA_SIZE, [$with_pre_data])
AC_SUBST(LOG2_CACHE_LINE_BYTES, [$with_log2_cache_line_bytes])
AC_SUBST(APICLI, [-DVPP_API_TEST_BUILTIN=${n_with_apicli}])
+AC_SUBST(DLMALLOC, [-DUSE_DLMALLOC=${n_enable_dlmalloc}])
AC_DEFINE_UNQUOTED(DPDK_SHARED_LIB, [${n_enable_dpdk_shared}])
AC_DEFINE_UNQUOTED(WITH_LIBSSL, [${n_with_libssl}])
@@ -447,6 +451,7 @@ PRINT_VAL([CFLAGS], ${CFLAGS})
PRINT_VAL([CPPFLAGS], ${CPPFLAGS})
PRINT_VAL([LDFLAGS], ${LDFLAGS})
PRINT_VAL([LOG2_CACHE_LINE_BYTES], ${with_log2_cache_line_bytes})
+PRINT_VAL([DLMALLOC], ${enable_dlmalloc})
AM_COND_IF([ENABLE_JAPI],
[
PRINT_VAL([JAVA_VERSION], ${JAVA_VERSION})