From ed69e5336d0710141a3ca5ce566896753d87bbbf Mon Sep 17 00:00:00 2001 From: Almaz Mingaleev Date: Thu, 12 Dec 2024 17:32:48 +0000 Subject: [PATCH] ICU-22992 madvise memory mapped files on Android. --- icu4c/source/common/umapfile.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/icu4c/source/common/umapfile.cpp b/icu4c/source/common/umapfile.cpp index b58ac37f4d45..ab8829d8c38a 100644 --- a/icu4c/source/common/umapfile.cpp +++ b/icu4c/source/common/umapfile.cpp @@ -237,7 +237,7 @@ typedef HANDLE MemoryMap; pData->map = (char *)data + length; pData->pHeader=(const DataHeader *)data; pData->mapAddr = data; -#if U_PLATFORM == U_PF_IPHONE +#if U_PLATFORM == U_PF_IPHONE || U_PLATFORM == U_PF_ANDROID posix_madvise(data, length, POSIX_MADV_RANDOM); #endif return true;