From f32c98f4876fd6f4d28d710d6ee1d59707b2ac62 Mon Sep 17 00:00:00 2001
From: Andy Shaw <andy.shaw@digia.com>
Date: Fri, 11 Jan 2013 09:06:26 +0100
Subject: [PATCH] Add a means to specify that the VM_POOL_SIZE can be 1gb and
 not 2gb
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Due to a reported problem where the reserving of 2gb was too big under
certain circumstances then in order to provide a means for people who
hit this problem a define is added so that the VM_POOL_SIZE is set to be
1gb instead. This is an optional define and the default is for the size
to be 2gb which keeps it to current behavior.

Change-Id: I73200e1bcfcf7b37c6ba62f8b7bcf217f239dfcb
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
---
 .../JavaScriptCore/jit/ExecutableAllocatorFixedVMPool.cpp     | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/jit/ExecutableAllocatorFixedVMPool.cpp b/src/3rdparty/javascriptcore/JavaScriptCore/jit/ExecutableAllocatorFixedVMPool.cpp
index e1237e41..5233923e 100644
--- a/src/3rdparty/javascriptcore/JavaScriptCore/jit/ExecutableAllocatorFixedVMPool.cpp
+++ b/src/3rdparty/javascriptcore/JavaScriptCore/jit/ExecutableAllocatorFixedVMPool.cpp
@@ -39,7 +39,11 @@
 
 #if CPU(X86_64)
     // These limits suitable on 64-bit platforms (particularly x86-64, where we require all jumps to have a 2Gb max range).
+#ifdef QT_USE_ONEGB_VMALLOCATOR
+    #define VM_POOL_SIZE (1024u * 1024u * 1024u) // 1Gb
+#else
     #define VM_POOL_SIZE (2u * 1024u * 1024u * 1024u) // 2Gb
+#endif
     #define COALESCE_LIMIT (16u * 1024u * 1024u) // 16Mb
 #else
     // These limits are hopefully sensible on embedded platforms.
-- 
GitLab