summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@digia.com>2014-11-07 12:26:57 +0100
committerAllan Sandfeld Jensen <allan.jensen@theqtcompany.com>2014-11-07 12:48:59 +0100
commit7e29781fac7f864ac80ca52be5e61c4f1a500308 (patch)
treeb4de4bb157c59a53d390535501f39e28862a0a12
parent701f6590a70695743f03423814530c5feb0173bf (diff)
Use fixed executable allocator on x64
Since the x86-64 assembler generator depends on jumps being expressable as 32bit offsets we need to use the fixed size executable allocator and not the on demand allocator. This patch removes its exclusion from being used on Windows. Task-number: QTBUG-42417 Change-Id: Ie6b127e9b4291869566fd99cc7efe05b566c8e66 Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
-rw-r--r--Source/JavaScriptCore/jit/ExecutableAllocatorFixedVMPool.cpp10
-rw-r--r--Source/WTF/wtf/Platform.h2
2 files changed, 2 insertions, 10 deletions
diff --git a/Source/JavaScriptCore/jit/ExecutableAllocatorFixedVMPool.cpp b/Source/JavaScriptCore/jit/ExecutableAllocatorFixedVMPool.cpp
index 7823cd2d2..ea2217924 100644
--- a/Source/JavaScriptCore/jit/ExecutableAllocatorFixedVMPool.cpp
+++ b/Source/JavaScriptCore/jit/ExecutableAllocatorFixedVMPool.cpp
@@ -31,20 +31,12 @@
#include "CodeProfiling.h"
#include <errno.h>
-#include <unistd.h>
#include <wtf/MetaAllocator.h>
#include <wtf/PageReservation.h>
#include <wtf/VMTags.h>
-#if OS(DARWIN)
-#include <sys/mman.h>
-#endif
-
-#if OS(LINUX)
-#include <stdio.h>
-#endif
-
#if !PLATFORM(IOS) && PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED < 1090
+#include <sys/mman.h>
// MADV_FREE_REUSABLE does not work for JIT memory on older OSes so use MADV_FREE in that case.
#define WTF_USE_MADV_FREE_FOR_JIT_MEMORY 1
#endif
diff --git a/Source/WTF/wtf/Platform.h b/Source/WTF/wtf/Platform.h
index 256474412..562840cf7 100644
--- a/Source/WTF/wtf/Platform.h
+++ b/Source/WTF/wtf/Platform.h
@@ -935,7 +935,7 @@
/* Pick which allocator to use; we only need an executable allocator if the assembler is compiled in.
On x86-64 we use a single fixed mmap, on other platforms we mmap on demand. */
#if ENABLE(ASSEMBLER)
-#if CPU(X86_64) && !OS(WINDOWS) || PLATFORM(IOS) || CPU(MIPS)
+#if CPU(X86_64) || PLATFORM(IOS) || CPU(MIPS)
#define ENABLE_EXECUTABLE_ALLOCATOR_FIXED 1
#else
#define ENABLE_EXECUTABLE_ALLOCATOR_DEMAND 1