From 38e9472d91e5bd5d4307d4315eafb19f01d6cbe7 Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Wed, 28 Sep 2022 09:00:18 +0200 Subject: masm: Treat Android as generic Posix regarding mmap and friends Apparently we cannot rely on madvise() to work as we expect it on linux. Fixes: QTBUG-106864 Fixes: QTBUG-106269 Change-Id: Ie488ad788386c1a8c493d6bba632787f5282baaa Reviewed-by: Fabian Kosmale (cherry picked from commit ffecc122d785de9c4c5defd8724526b8dd4982dc) Reviewed-by: Qt Cherry-pick Bot --- src/qml/memory/qv4mm.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/qml') diff --git a/src/qml/memory/qv4mm.cpp b/src/qml/memory/qv4mm.cpp index 60b909862b..aaf9dab134 100644 --- a/src/qml/memory/qv4mm.cpp +++ b/src/qml/memory/qv4mm.cpp @@ -177,7 +177,7 @@ struct MemorySegment { size_t pageSize = WTF::pageSize(); size = (size + pageSize - 1) & ~(pageSize - 1); -#if !defined(Q_OS_LINUX) && !defined(Q_OS_WIN) +#if (!defined(Q_OS_LINUX) && !defined(Q_OS_WIN)) || defined(Q_OS_ANDROID) // Linux and Windows zero out pages that have been decommitted and get committed again. // unfortunately that's not true on other OSes (e.g. BSD based ones), so zero out the // memory before decommit, so that we can be sure that all chunks we allocate will be -- cgit v1.2.3