support for compiling with tcmalloc
This commit is contained in:
parent
75fcab8c23
commit
0a802bd7a0
15
README
15
README
@ -27,6 +27,21 @@ After you build Redis is a good idea to test it, using:
|
|||||||
|
|
||||||
% make test
|
% make test
|
||||||
|
|
||||||
|
Buliding using tcmalloc
|
||||||
|
-----------------------
|
||||||
|
|
||||||
|
tcmalloc is a fast and space efficient implementation of malloc(). Compiling
|
||||||
|
Redis with it can improve performances and memeory usage. You can read
|
||||||
|
more about it here: http://goog-perftools.sourceforge.net/doc/tcmalloc.html
|
||||||
|
|
||||||
|
In order to compile Redis with tcmalloc support install tcmalloc on your system
|
||||||
|
and then use:
|
||||||
|
|
||||||
|
% make USE_TCMALLOC=yes
|
||||||
|
|
||||||
|
Note that you can pass any other target to make, as long as you append
|
||||||
|
USE_TCMALLOC=yes at the end.
|
||||||
|
|
||||||
Running Redis
|
Running Redis
|
||||||
-------------
|
-------------
|
||||||
|
|
||||||
|
@ -12,6 +12,10 @@ else
|
|||||||
CFLAGS?= -std=c99 -pedantic $(OPTIMIZATION) -Wall -W $(ARCH) $(PROF)
|
CFLAGS?= -std=c99 -pedantic $(OPTIMIZATION) -Wall -W $(ARCH) $(PROF)
|
||||||
CCLINK?= -lm -pthread
|
CCLINK?= -lm -pthread
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq ($(USE_TCMALLOC),yes)
|
||||||
|
CCLINK+= -ltcmalloc
|
||||||
|
endif
|
||||||
CCOPT= $(CFLAGS) $(CCLINK) $(ARCH) $(PROF)
|
CCOPT= $(CFLAGS) $(CCLINK) $(ARCH) $(PROF)
|
||||||
DEBUG?= -g -rdynamic -ggdb
|
DEBUG?= -g -rdynamic -ggdb
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user