diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2022-09-28 09:00:18 +0200 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2022-10-06 20:38:02 +0200 |
commit | ffecc122d785de9c4c5defd8724526b8dd4982dc (patch) | |
tree | 1e53a45d9e919454a2dd101917fa0577ea8bfcbb /src/qml/memory | |
parent | 1e712c95cee58ae242a93c029a7f79cf65b43882 (diff) |
masm: Treat Android as generic Posix regarding mmap and friends
Apparently we cannot rely on madvise() to work as we expect it on linux.
Pick-to: 6.4 6.2 5.15
Fixes: QTBUG-106864
Fixes: QTBUG-106269
Change-Id: Ie488ad788386c1a8c493d6bba632787f5282baaa
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/qml/memory')
-rw-r--r-- | src/qml/memory/qv4mm.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qml/memory/qv4mm.cpp b/src/qml/memory/qv4mm.cpp index 74829a21d9..717c59cb26 100644 --- a/src/qml/memory/qv4mm.cpp +++ b/src/qml/memory/qv4mm.cpp @@ -138,7 +138,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 |