This patch links libtcmalloc or libtcmalloc_minimal when it is
available.  If you don't want to use tcmalloc, run configure with
"--without-tcmalloc" option.

Signed-off-by: MORITA Kazutaka <[email protected]>
---
Hi Yuan,

I think we don't need a wrapper function to use tcmalloc.  Can we use
this instead of your slab patch?

 configure.ac |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/configure.ac b/configure.ac
index c406dd5..0a058ee 100644
--- a/configure.ac
+++ b/configure.ac
@@ -192,6 +192,13 @@ AC_ARG_WITH([initddir],
        [ INITDDIR="$withval" ],
        [ INITDDIR="$sysconfdir/init.d" ])
 
+AC_ARG_WITH([tcmalloc],
+       [  --with-tcmalloc         : use tcmalloc for memory management ],,
+       [ with_tcmalloc="yes" ])
+AS_IF([test "x${with_tcmalloc}" = xyes],
+       AC_CHECK_LIB([tcmalloc_minimal], [malloc],,
+               AC_CHECK_LIB([tcmalloc], [malloc])))
+
 CP=cp
 OS_LDL="-ldl"
 case "$host_os" in
-- 
1.7.2.5

-- 
sheepdog mailing list
[email protected]
http://lists.wpkg.org/mailman/listinfo/sheepdog

Reply via email to