This is a hard requirement from the QQmlEngine internals since 5.5 and
otherwise causes crashes inside the engine.
Change-Id: Id25f465576a0095f5b34da469abe761d3f3bd866
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
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);