Make jemalloc the default choice.

Change-Id: I5ff0cf0c396b7ae6278e6fcd5a0d50f8b966fb54
This commit is contained in:
Christopher Ferris 2014-07-10 18:53:41 -07:00
parent c6bc001776
commit 8e32b7b354
3 changed files with 17 additions and 14 deletions

View file

@ -44,6 +44,10 @@
#$(call add-clean-step, find $(OUT_DIR) -type f -name "IGTalkSession*" -print0 | xargs -0 rm -f)
#$(call add-clean-step, rm -rf $(PRODUCT_OUT)/data/*)
# Switching to jemalloc requires deleting these files.
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/STATIC_LIBRARIES/libc_*)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/SHARED_LIBRARIES/libc_*)
# ************************************************
# NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST
# ************************************************

View file

@ -515,12 +515,13 @@ ifeq ($(strip $(DEBUG_BIONIC_LIBC)),true)
libc_common_cflags += -DDEBUG
endif
ifeq ($(MALLOC_IMPL),jemalloc)
libc_common_cflags += -DUSE_JEMALLOC
libc_malloc_src := bionic/jemalloc_wrapper.cpp
else
ifeq ($(MALLOC_IMPL),dlmalloc)
libc_common_cflags += -DUSE_DLMALLOC
libc_malloc_src := bionic/dlmalloc.c
else
libc_common_cflags += -DUSE_JEMALLOC
libc_malloc_src := bionic/jemalloc_wrapper.cpp
libc_common_c_includes += external/jemalloc/include
endif
# To customize dlmalloc's alignment, set BOARD_MALLOC_ALIGNMENT in
@ -547,14 +548,10 @@ libc_common_cppflags := \
# Define some common includes
# ========================================================
libc_common_c_includes := \
libc_common_c_includes += \
$(LOCAL_PATH)/stdlib \
$(LOCAL_PATH)/stdio \
ifeq ($(MALLOC_IMPL),jemalloc)
libc_common_c_includes += external/jemalloc/include
endif
# ========================================================
# Add in the arch-specific flags.
# Must be called with $(eval).
@ -873,7 +870,7 @@ LOCAL_WHOLE_STATIC_LIBRARIES := \
LOCAL_WHOLE_STATIC_LIBRARIES_arm := libc_aeabi
ifeq ($(MALLOC_IMPL),jemalloc)
ifneq ($(MALLOC_IMPL),dlmalloc)
LOCAL_WHOLE_STATIC_LIBRARIES += libjemalloc
endif

View file

@ -40,7 +40,9 @@ test_cflags = \
test_cflags += -D__STDC_LIMIT_MACROS # For glibc.
ifeq ($(MALLOC_IMPL),jemalloc)
ifeq ($(MALLOC_IMPL),dlmalloc)
test_cflags += -DUSE_DLMALLOC
else
test_cflags += -DUSE_JEMALLOC
endif
@ -115,10 +117,10 @@ libBionicStandardTests_src_files := \
libBionicStandardTests_cflags := \
$(test_cflags) \
ifeq ($(MALLOC_IMPL),jemalloc)
libBionicStandardTests_cflags += -DUSE_JEMALLOC
else
ifeq ($(MALLOC_IMPL),dlmalloc)
libBionicStandardTests_cflags += -DUSE_DLMALLOC
else
libBionicStandardTests_cflags += -DUSE_JEMALLOC
endif
libBionicStandardTests_cppflags := \