Skip to content

Commit 4dcb852

Browse files
committed
Add option for tcmalloc
1 parent c6e5c59 commit 4dcb852

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

auto/options

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ TC_DEBUG=NO
2929
TC_PF_RING_DIR=NONE
3030
TC_DETECT_MEMORY=NO
3131
TC_PCAP_NEEDED=NO
32+
TC_TCMALLOC=NO
3233

3334
TC_CC_OPT=
3435
TC_LD_OPT=
@@ -76,6 +77,7 @@ do
7677
--udp) TC_UDP=YES ;;
7778

7879
--with-debug) TC_DEBUG=YES ;;
80+
--with-tcmalloc) TC_TCMALLOC=YES ;;
7981
--with-pfring=*) TC_PF_RING_DIR="$value" ;;
8082
--with-detect-memory) TC_DETECT_MEMORY=YES ;;
8183

@@ -111,6 +113,7 @@ cat << END
111113
--with-ld-opt=OPTIONS set additional linker options
112114
--with-pfring=PATH set path to PF_RING library sources
113115
--with-debug enable debug logging
116+
--with-tcmalloc use tcmalloc instead of malloc
114117

115118
--offline run tcpcopy at offline mode
116119
--single run tcpcopy at non-distributed mode

configure

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,10 @@ if [ $TC_PCAP_NEEDED = YES ]; then
8282
fi
8383
fi
8484

85+
if [ $TC_TCMALLOC = YES ]; then
86+
CORE_LIBS="$CORE_LIBS -ltcmalloc"
87+
fi
88+
8589
if [ $TC_MILLION_SUPPORT = YES ]; then
8690
have=TC_MILLION_SUPPORT . auto/have
8791
fi

0 commit comments

Comments
 (0)