aboutsummaryrefslogtreecommitdiffstats
path: root/src/3rdparty/masm/wtf/OSAllocatorIntegrity.cpp
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2018-04-27 01:00:20 +0200
committerQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2018-04-27 01:00:20 +0200
commite282db62b1fca2ea133162bc6254595a42f4b861 (patch)
treeafb0bb98f19153e25f7f3c6b200d579e731baeae /src/3rdparty/masm/wtf/OSAllocatorIntegrity.cpp
parent1b30e8f94cc15352583e8e1f27139676683f62af (diff)
parent2f397aa15a13efbadf6c1bc378bb134ac1e655c5 (diff)
Merge remote-tracking branch 'origin/5.11' into dev
Diffstat (limited to 'src/3rdparty/masm/wtf/OSAllocatorIntegrity.cpp')
-rw-r--r--src/3rdparty/masm/wtf/OSAllocatorIntegrity.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/3rdparty/masm/wtf/OSAllocatorIntegrity.cpp b/src/3rdparty/masm/wtf/OSAllocatorIntegrity.cpp
index 451ca147d1..7addf9e5c2 100644
--- a/src/3rdparty/masm/wtf/OSAllocatorIntegrity.cpp
+++ b/src/3rdparty/masm/wtf/OSAllocatorIntegrity.cpp
@@ -123,6 +123,12 @@ Error setAttributes(MemoryRegion mr, bool writable, bool executable)
return SetMemoryRegionAttributes(mr, attributes);
}
+void OSAllocator::setMemoryAttributes(void* addr, bool writable, bool executable)
+{
+ const MRPair* pair = memoryRegionsContainer.getMRPair((Address)addr);
+ CheckSuccess(setAttributes(pair->vmr, writable, executable));
+}
+
void* OSAllocator::reserveUncommitted(size_t bytes, Usage usage, bool writable, bool executable)
{
MemoryRegion VMR;
@@ -229,4 +235,10 @@ void OSAllocator::releaseDecommitted(void* address, size_t bytes)
memoryRegionsContainer.deleteMRPair(pair);
}
}
+
+bool OSAllocator::canAllocateExecutableMemory()
+{
+ return true;
+}
+
} // namespace WTF