summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSalvatore Sanfilippo <antirez@gmail.com>2017-02-19 15:02:37 +0000
committerSalvatore Sanfilippo <antirez@gmail.com>2017-02-19 15:02:37 +0000
commit4e9cf4cc7ed4b732fc4bb592f19ceb41d132954e (patch)
tree28812c2debff3a16f450d7e823a07163550d3289
parent72d6d64771ce52519c240fb122dbb35f989b4669 (diff)
downloadredis-4e9cf4cc7ed4b732fc4bb592f19ceb41d132954e.tar.gz
ARM: Use libc malloc by default.
I'm not sure how much test Jemalloc gets on ARM, moreover compiling Redis with Jemalloc support in not very powerful devices, like most ARMs people will build Redis on, is extremely slow. It is possible to enable Jemalloc build anyway if needed by using "make MALLOC=jemalloc".
-rw-r--r--src/Makefile9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/Makefile b/src/Makefile
index f211eb84b..83f5c6d79 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -28,11 +28,14 @@ PREFIX?=/usr/local
INSTALL_BIN=$(PREFIX)/bin
INSTALL=install
-# Default allocator
+# Default allocator defaults to Jemalloc if it's not an ARM
+MALLOC=libc
+ifneq ($(uname_M),armv6l)
+ifneq ($(uname_M),armv7l)
ifeq ($(uname_S),Linux)
MALLOC=jemalloc
-else
- MALLOC=libc
+endif
+endif
endif
# Backwards compatibility for selecting an allocator