diff --git a/ChangeLog b/ChangeLog index 301bb22c2a..f511af2962 100644 --- a/ChangeLog +++ b/ChangeLog @@ -16,6 +16,9 @@ Changes in version 0.2.0.20-?? - 2008-02-?? replacement on Linux: some glibc libraries do very poorly with Tor's memory allocation patterns. Pass --enable-openbsd-malloc to get the replacement malloc code. + - Add a --with-tcmalloc option to the configure script to link + against tcmalloc (if present). Does not yet search for + non-system include paths. o Minor features (controller): - Add a new __HashedControlSessionPassword option for controllers diff --git a/configure.in b/configure.in index ec5cae78a2..0445ad97f7 100644 --- a/configure.in +++ b/configure.in @@ -557,6 +557,14 @@ if [[ $dmalloc -eq 1 ]]; then AC_CHECK_FUNCS(dmalloc_strdup dmalloc_strndup) fi +AC_ARG_WITH(tcmalloc, +[ --with-tcmalloc Use tcmalloc memory allocation library. ], +[ tcmalloc=yes ], [ tcmalloc=no ]) + +if test x$tcmalloc = xyes ; then + LDFLAGS="-ltcmalloc $LDFLAGS" +fi + # Allow user to specify an alternate syslog facility AC_ARG_WITH(syslog-facility, [ --with-syslog-facility=LOG syslog facility to use (default=LOG_DAEMON)],