readium / readium-sdk

A C++ ePub renderer SDK

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CPU Cache Utils to remove in Android build config! (unnecessary)

danielweck opened this issue · comments

Well, unless ENABLE_SYS_CACHE_FLUSH is defined, the "CPU cache util" stuff should not be included in the build:
https://github.com/readium/readium-sdk/blob/develop/ePub3/utilities/byte_buffer.cpp#L27

#ifdef ENABLE_SYS_CACHE_FLUSH
#include "CPUCacheUtils.h"
#endif //ENABLE_SYS_CACHE_FLUSH
...
...

void ByteBuffer::Clean(unsigned char *ptr, size_t len)
{
    bzero(ptr, len);

#ifdef ENABLE_SYS_CACHE_FLUSH
    epub_sys_cache_flush(ptr, len);
#endif //ENABLE_SYS_CACHE_FLUSH
}

See:
0c6c54f

Also see:
readium/SDKLauncher-iOS#38 (comment)

Ah, I see that the "CPU Cache Utils" are included in the build (they can be removed, as they are unused):

https://github.com/readium/readium-sdk/blob/develop/Platform/Android/epub3/Stable.mk#L242
https://github.com/readium/readium-sdk/blob/develop/Platform/Android/epub3/Experimental.mk#L241

LOCAL_SRC_FILES := \
...
    $(EPUB3_PATH)/utilities/CPUCacheUtils_arm.S \
    $(EPUB3_PATH)/utilities/CPUCacheUtils_i386.S \
    $(EPUB3_PATH)/utilities/CPUCacheUtils_x64.S \
    $(EPUB3_PATH)/utilities/CPUCacheUtils.c \

Fixed in fe074d5