msm: idef TARGET_USES_ION for targets that dont have ION (msm7x30)

Change-Id: I048b5ad12d1f050c8d07ccbc279dde8a56d8c043
This commit is contained in:
freexperia 2011-12-06 06:42:07 +02:00 committed by Steve Kondik
parent a9b1e1661c
commit 7fab09c1b3
2 changed files with 8 additions and 3 deletions

View File

@ -53,18 +53,21 @@ include $(BUILD_SHARED_LIBRARY)
#MemAlloc Library
include $(CLEAR_VARS)
LOCAL_PRELINK_MODULE := false
LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)
LOCAL_SHARED_LIBRARIES := liblog libcutils libutils
LOCAL_SRC_FILES := ionalloc.cpp \
ashmemalloc.cpp \
LOCAL_SRC_FILES += ashmemalloc.cpp \
pmemalloc.cpp \
pmem_bestfit_alloc.cpp \
alloc_controller.cpp
LOCAL_CFLAGS:= -DLOG_TAG=\"memalloc\" -DLOG_NDDEBUG=0
ifeq ($(TARGET_USES_ION),true)
LOCAL_CFLAGS += -DUSE_ION
LOCAL_SRC_FILES += ionalloc.cpp
endif
LOCAL_MODULE := libmemalloc

View File

@ -76,6 +76,7 @@ sp<IAllocController> IAllocController::getInstance(bool useMasterHeap)
return sController;
}
#ifdef USE_ION
//-------------- IonController-----------------------//
IonController::IonController()
@ -117,7 +118,6 @@ int IonController::allocate(alloc_data& data, int usage,
data.flags = ionFlags;
ret = mIonAlloc->alloc_buffer(data);
// Fallback
if(ret < 0 && canFallback(compositionType,
usage,
@ -131,6 +131,7 @@ int IonController::allocate(alloc_data& data, int usage,
if(ret >= 0 )
data.allocType = private_handle_t::PRIV_FLAGS_USES_ION;
return ret;
}
@ -145,6 +146,7 @@ sp<IMemAlloc> IonController::getAllocator(int flags)
return memalloc;
}
#endif
//-------------- PmemKernelController-----------------------//