Title: [89278] releases/WebKitGTK/webkit-1.4/Source/_javascript_Core
- Revision
- 89278
- Author
- mrobin...@webkit.org
- Date
- 2011-06-20 12:41:46 -0700 (Mon, 20 Jun 2011)
Log Message
Merging r86957
Modified Paths
Diff
Modified: releases/WebKitGTK/webkit-1.4/Source/_javascript_Core/ChangeLog (89277 => 89278)
--- releases/WebKitGTK/webkit-1.4/Source/_javascript_Core/ChangeLog 2011-06-20 19:39:45 UTC (rev 89277)
+++ releases/WebKitGTK/webkit-1.4/Source/_javascript_Core/ChangeLog 2011-06-20 19:41:46 UTC (rev 89278)
@@ -1,3 +1,17 @@
+2011-05-20 Xan Lopez <xlo...@igalia.com>
+
+ Reviewed by Oliver Hunt.
+
+ JIT requires VM overcommit (particularly on x86-64), Linux does not by default support this without swap?
+ https://bugs.webkit.org/show_bug.cgi?id=42756
+
+ Use the MAP_NORESERVE flag for mmap on Linux to skip the kernel
+ check of the available memory. This should give us an
+ overcommit-like behavior in most systems, which is what we want.
+
+ * wtf/OSAllocatorPosix.cpp:
+ (WTF::OSAllocator::reserveAndCommit): pass MAP_NORSERVE to mmap.
+
2011-06-04 Gustavo Noronha Silva <g...@gnome.org>
Unreviewed, MIPS build fix.
Modified: releases/WebKitGTK/webkit-1.4/Source/_javascript_Core/wtf/OSAllocatorPosix.cpp (89277 => 89278)
--- releases/WebKitGTK/webkit-1.4/Source/_javascript_Core/wtf/OSAllocatorPosix.cpp 2011-06-20 19:39:45 UTC (rev 89277)
+++ releases/WebKitGTK/webkit-1.4/Source/_javascript_Core/wtf/OSAllocatorPosix.cpp 2011-06-20 19:41:46 UTC (rev 89278)
@@ -54,6 +54,18 @@
int flags = MAP_PRIVATE | MAP_ANON;
+#if OS(LINUX)
+ // Linux distros usually do not allow overcommit by default, so
+ // JSC's strategy of mmaping a large amount of memory upfront
+ // won't work very well on some systems. Fortunately there's a
+ // flag we can pass to mmap to disable the overcommit check for
+ // this particular call, so we can get away with it as long as the
+ // overcommit flag value in /proc/sys/vm/overcommit_memory is 0
+ // ('heuristic') and not 2 (always check). 0 is the usual default
+ // value, so this should work well in general.
+ flags |= MAP_NORESERVE;
+#endif
+
#if OS(DARWIN) && !defined(BUILDING_ON_TIGER)
int fd = usage;
#else
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes