aboutsummaryrefslogtreecommitdiffstats
path: root/src/3rdparty/masm/wtf/OSAllocatorPosix.cpp
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@digia.com>2014-10-21 17:21:56 +0200
committerUlf Hermann <ulf.hermann@digia.com>2014-10-30 13:19:45 +0100
commit2fb59fe64b75ba1d2c7f0e5d33dc199d8b8ee591 (patch)
tree7f2f111fd654d8dc00baaa108aadcc2aa5d29e78 /src/3rdparty/masm/wtf/OSAllocatorPosix.cpp
parent78ac7ecbd4af02e989d3f391cf0f3627f93fd12c (diff)
Remove guard pages option from uncommitted page reservations
It's only implemented for non-linux unix-like systems and it's quite challenging to get it right everywhere else. So, instead of giving the user the illusion that guard pages might be available we just drop them. Change-Id: I7ec74c84f6215f22bd10758728b18bbecc0adf59 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/3rdparty/masm/wtf/OSAllocatorPosix.cpp')
-rw-r--r--src/3rdparty/masm/wtf/OSAllocatorPosix.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/3rdparty/masm/wtf/OSAllocatorPosix.cpp b/src/3rdparty/masm/wtf/OSAllocatorPosix.cpp
index d8c8e0378f..f52c22f7fa 100644
--- a/src/3rdparty/masm/wtf/OSAllocatorPosix.cpp
+++ b/src/3rdparty/masm/wtf/OSAllocatorPosix.cpp
@@ -38,7 +38,7 @@
namespace WTF {
-void* OSAllocator::reserveUncommitted(size_t bytes, Usage usage, bool writable, bool executable, bool includesGuardPages)
+void* OSAllocator::reserveUncommitted(size_t bytes, Usage usage, bool writable, bool executable)
{
#if OS(QNX)
// Reserve memory with PROT_NONE and MAP_LAZY so it isn't committed now.
@@ -49,14 +49,13 @@ void* OSAllocator::reserveUncommitted(size_t bytes, Usage usage, bool writable,
UNUSED_PARAM(usage);
UNUSED_PARAM(writable);
UNUSED_PARAM(executable);
- UNUSED_PARAM(includesGuardPages);
void* result = mmap(0, bytes, PROT_NONE, MAP_NORESERVE | MAP_PRIVATE | MAP_ANON, -1, 0);
if (result == MAP_FAILED)
CRASH();
madvise(result, bytes, MADV_DONTNEED);
#else
- void* result = reserveAndCommit(bytes, usage, writable, executable, includesGuardPages);
+ void* result = reserveAndCommit(bytes, usage, writable, executable);
#if HAVE(MADV_FREE_REUSE)
// To support the "reserve then commit" model, we have to initially decommit.
while (madvise(result, bytes, MADV_FREE_REUSABLE) == -1 && errno == EAGAIN) { }