Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
01fc59b7
Commit
01fc59b7
authored
Apr 19, 2011
by
Pieter Noordhuis
Browse files
More allocators
parent
ff818784
Changes
2
Show whitespace changes
Inline
Side-by-side
src/Makefile
View file @
01fc59b7
...
...
@@ -16,9 +16,23 @@ else
endif
ifeq
($(USE_TCMALLOC),yes)
CC
LINK
+=
-ltcmalloc
C
FLAGS
+=
-DUSE_TCMALLOC
ALLOC_
LINK
=
-ltcmalloc
ALLOC_
FLAGS
=
-DUSE_TCMALLOC
endif
ifeq
($(USE_TCMALLOC_MINIMAL),yes)
ALLOC_LINK
=
-ltcmalloc_minimal
ALLOC_FLAGS
=
-DUSE_TCMALLOC
endif
ifeq
($(USE_JEMALLOC),yes)
ALLOC_LINK
=
-ljemalloc
ALLOC_FLAGS
=
-DUSE_JEMALLOC
endif
CCLINK
+=
$(ALLOC_LINK)
CFLAGS
+=
$(ALLOC_FLAGS)
CCOPT
=
$(CFLAGS)
$(CCLINK)
$(ARCH)
$(PROF)
PREFIX
=
/usr/local
...
...
src/config.h
View file @
01fc59b7
...
...
@@ -15,6 +15,13 @@
#define HAVE_MALLOC_SIZE 1
#define redis_malloc_size(p) tc_malloc_size(p)
#endif
#elif defined(USE_JEMALLOC)
#define JEMALLOC_MANGLE
#include <jemalloc/jemalloc.h>
#if JEMALLOC_VERSION_MAJOR >= 2 && JEMALLOC_VERSION_MINOR >= 1
#define HAVE_MALLOC_SIZE 1
#define redis_malloc_size(p) JEMALLOC_P(malloc_usable_size)(p)
#endif
#elif defined(__APPLE__)
#include <malloc/malloc.h>
#define HAVE_MALLOC_SIZE 1
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment