aboutsummaryrefslogtreecommitdiffstats
path: root/src/3rdparty/masm
diff options
context:
space:
mode:
authorUlf Hermann <[email protected]>2024-12-10 14:01:21 +0100
committerUlf Hermann <[email protected]>2024-12-17 14:09:32 +0100
commitcaf7f29f3acad624aedc5847819e6e2d28a408cb (patch)
tree3d1d63f0ab226587db3f78d091837154253518a7 /src/3rdparty/masm
parent4f64760f3bac8aa0278d8a315297712405865836 (diff)
Use MAP_JIT on all Apple platforms
... and make it actually compile. ... and set the flag for JIT pages being prepared. We are clever enough not to make them executable right away. Pick-to: 6.9 6.8 Task-number: QTBUG-131957 Change-Id: I07dc6a9c8ec7d0881d73fc5bd44a6059f66dd2eb Reviewed-by: Fabian Kosmale <[email protected]>
Diffstat (limited to 'src/3rdparty/masm')
-rw-r--r--src/3rdparty/masm/wtf/OSAllocatorPosix.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/3rdparty/masm/wtf/OSAllocatorPosix.cpp b/src/3rdparty/masm/wtf/OSAllocatorPosix.cpp
index ca14c6e056..daa35a3cd7 100644
--- a/src/3rdparty/masm/wtf/OSAllocatorPosix.cpp
+++ b/src/3rdparty/masm/wtf/OSAllocatorPosix.cpp
@@ -139,8 +139,8 @@ void* OSAllocator::reserveAndCommit(size_t bytes, Usage usage, bool writable, bo
protection |= PROT_EXEC;
int flags = MAP_PRIVATE | MAP_ANON;
-#if PLATFORM(IOS)
- if (executable)
+#if OS(DARWIN)
+ if (executable || usage == OSAllocator::JSJITCodePages)
flags |= MAP_JIT;
#endif
@@ -294,9 +294,8 @@ bool OSAllocator::canAllocateExecutableMemory()
bool OSAllocator::canAllocateExecutableMemory()
{
int flags = MAP_PRIVATE;
-#if PLATFORM(IOS)
- if (executable)
- flags |= MAP_JIT;
+#if OS(DARWIN)
+ flags |= MAP_JIT;
#endif
// Get a read/write memfd page