summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJędrzej Nowacki <jedrzej.nowacki@digia.com>2012-10-22 15:03:48 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-10-22 16:16:38 +0200
commit88087611ef6d0c4800de756a850496085c41c282 (patch)
treecb9cf530d6abec387ba7581b2dc8bbb2367d82c3 /src
parentea49fb971145d66f2b58df63fb1c0a95fe59db6a (diff)
downloadqtscript-88087611ef6d0c4800de756a850496085c41c282.tar.gz
Fix mmap usage.
Add missing MAP_NORESERVE, and fix error checking. Special thanks to Olivier JG for debugging the issue. Task-number: QTBUG-27322 Change-Id: Ic4d5aa5849b9b5500fd3065aad5c86dd089a850b Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src')
-rw-r--r--src/3rdparty/javascriptcore/JavaScriptCore/jit/ExecutableAllocatorFixedVMPool.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/jit/ExecutableAllocatorFixedVMPool.cpp b/src/3rdparty/javascriptcore/JavaScriptCore/jit/ExecutableAllocatorFixedVMPool.cpp
index 16d0fb1..e1237e4 100644
--- a/src/3rdparty/javascriptcore/JavaScriptCore/jit/ExecutableAllocatorFixedVMPool.cpp
+++ b/src/3rdparty/javascriptcore/JavaScriptCore/jit/ExecutableAllocatorFixedVMPool.cpp
@@ -305,8 +305,8 @@ public:
randomLocation += (1 << 24);
randomLocation <<= 21;
#endif
- m_base = mmap(reinterpret_cast<void*>(randomLocation), m_totalHeapSize, INITIAL_PROTECTION_FLAGS, MAP_PRIVATE | MAP_ANON, VM_TAG_FOR_EXECUTABLEALLOCATOR_MEMORY, 0);
- if (!m_base)
+ m_base = mmap(reinterpret_cast<void*>(randomLocation), m_totalHeapSize, INITIAL_PROTECTION_FLAGS, MAP_PRIVATE | MAP_ANON | MAP_NORESERVE, VM_TAG_FOR_EXECUTABLEALLOCATOR_MEMORY, 0);
+ if (m_base == MAP_FAILED)
CRASH();
// For simplicity, we keep all memory in m_freeList in a 'released' state.