Merge "Make jemalloc the default choice."
This commit is contained in:
commit
96502e273e
@ -44,6 +44,10 @@
|
|||||||
#$(call add-clean-step, find $(OUT_DIR) -type f -name "IGTalkSession*" -print0 | xargs -0 rm -f)
|
#$(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/*)
|
#$(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
|
# NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST
|
||||||
# ************************************************
|
# ************************************************
|
||||||
|
@ -515,12 +515,13 @@ ifeq ($(strip $(DEBUG_BIONIC_LIBC)),true)
|
|||||||
libc_common_cflags += -DDEBUG
|
libc_common_cflags += -DDEBUG
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(MALLOC_IMPL),jemalloc)
|
ifeq ($(MALLOC_IMPL),dlmalloc)
|
||||||
libc_common_cflags += -DUSE_JEMALLOC
|
|
||||||
libc_malloc_src := bionic/jemalloc_wrapper.cpp
|
|
||||||
else
|
|
||||||
libc_common_cflags += -DUSE_DLMALLOC
|
libc_common_cflags += -DUSE_DLMALLOC
|
||||||
libc_malloc_src := bionic/dlmalloc.c
|
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
|
endif
|
||||||
|
|
||||||
# To customize dlmalloc's alignment, set BOARD_MALLOC_ALIGNMENT in
|
# To customize dlmalloc's alignment, set BOARD_MALLOC_ALIGNMENT in
|
||||||
@ -547,14 +548,10 @@ libc_common_cppflags := \
|
|||||||
|
|
||||||
# Define some common includes
|
# Define some common includes
|
||||||
# ========================================================
|
# ========================================================
|
||||||
libc_common_c_includes := \
|
libc_common_c_includes += \
|
||||||
$(LOCAL_PATH)/stdlib \
|
$(LOCAL_PATH)/stdlib \
|
||||||
$(LOCAL_PATH)/stdio \
|
$(LOCAL_PATH)/stdio \
|
||||||
|
|
||||||
ifeq ($(MALLOC_IMPL),jemalloc)
|
|
||||||
libc_common_c_includes += external/jemalloc/include
|
|
||||||
endif
|
|
||||||
|
|
||||||
# ========================================================
|
# ========================================================
|
||||||
# Add in the arch-specific flags.
|
# Add in the arch-specific flags.
|
||||||
# Must be called with $(eval).
|
# Must be called with $(eval).
|
||||||
@ -873,7 +870,7 @@ LOCAL_WHOLE_STATIC_LIBRARIES := \
|
|||||||
|
|
||||||
LOCAL_WHOLE_STATIC_LIBRARIES_arm := libc_aeabi
|
LOCAL_WHOLE_STATIC_LIBRARIES_arm := libc_aeabi
|
||||||
|
|
||||||
ifeq ($(MALLOC_IMPL),jemalloc)
|
ifneq ($(MALLOC_IMPL),dlmalloc)
|
||||||
LOCAL_WHOLE_STATIC_LIBRARIES += libjemalloc
|
LOCAL_WHOLE_STATIC_LIBRARIES += libjemalloc
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -40,7 +40,9 @@ test_cflags = \
|
|||||||
|
|
||||||
test_cflags += -D__STDC_LIMIT_MACROS # For glibc.
|
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
|
test_cflags += -DUSE_JEMALLOC
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@ -115,10 +117,10 @@ libBionicStandardTests_src_files := \
|
|||||||
libBionicStandardTests_cflags := \
|
libBionicStandardTests_cflags := \
|
||||||
$(test_cflags) \
|
$(test_cflags) \
|
||||||
|
|
||||||
ifeq ($(MALLOC_IMPL),jemalloc)
|
ifeq ($(MALLOC_IMPL),dlmalloc)
|
||||||
libBionicStandardTests_cflags += -DUSE_JEMALLOC
|
|
||||||
else
|
|
||||||
libBionicStandardTests_cflags += -DUSE_DLMALLOC
|
libBionicStandardTests_cflags += -DUSE_DLMALLOC
|
||||||
|
else
|
||||||
|
libBionicStandardTests_cflags += -DUSE_JEMALLOC
|
||||||
endif
|
endif
|
||||||
|
|
||||||
libBionicStandardTests_cppflags := \
|
libBionicStandardTests_cppflags := \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user