aboutsummaryrefslogtreecommitdiffstats
path: root/src/3rdparty/masm
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty/masm')
-rw-r--r--src/3rdparty/masm/wtf/OSAllocatorWinRT.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/3rdparty/masm/wtf/OSAllocatorWinRT.cpp b/src/3rdparty/masm/wtf/OSAllocatorWinRT.cpp
index 9b8f5bf46b..ba251d2ecf 100644
--- a/src/3rdparty/masm/wtf/OSAllocatorWinRT.cpp
+++ b/src/3rdparty/masm/wtf/OSAllocatorWinRT.cpp
@@ -33,9 +33,17 @@
namespace WTF {
+inline size_t getPageSize()
+{
+ SYSTEM_INFO info;
+ GetNativeSystemInfo(&info);
+ return info.dwPageSize;
+}
+
void* OSAllocator::reserveUncommitted(size_t bytes, Usage, bool, bool)
{
- void* result = _aligned_malloc(bytes, 16);
+ static const size_t pageSize = getPageSize();
+ void* result = _aligned_malloc(bytes, pageSize);
if (!result)
CRASH();
memset(result, 0, bytes);