From 4e9cf4cc7ed4b732fc4bb592f19ceb41d132954e Mon Sep 17 00:00:00 2001 From: Salvatore Sanfilippo Date: Sun, 19 Feb 2017 15:02:37 +0000 Subject: [PATCH] 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". --- src/Makefile | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/Makefile b/src/Makefile index f211eb84..83f5c6d7 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