Changeset 86957 in webkit
- Timestamp:
- May 20, 2011 8:55:16 AM (13 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r86923 r86957 1 2011-05-20 Xan Lopez <xlopez@igalia.com> 2 3 Reviewed by Oliver Hunt. 4 5 JIT requires VM overcommit (particularly on x86-64), Linux does not by default support this without swap? 6 https://bugs.webkit.org/show_bug.cgi?id=42756 7 8 Use the MAP_NORESERVE flag for mmap on Linux to skip the kernel 9 check of the available memory. This should give us an 10 overcommit-like behavior in most systems, which is what we want. 11 12 * wtf/OSAllocatorPosix.cpp: 13 (WTF::OSAllocator::reserveAndCommit): pass MAP_NORSERVE to mmap. 14 1 15 2011-05-19 Gabor Loki <loki@webkit.org> 2 16 -
trunk/Source/JavaScriptCore/wtf/OSAllocatorPosix.cpp
r86906 r86957 55 55 56 56 int flags = MAP_PRIVATE | MAP_ANON; 57 58 #if OS(LINUX) 59 // Linux distros usually do not allow overcommit by default, so 60 // JSC's strategy of mmaping a large amount of memory upfront 61 // won't work very well on some systems. Fortunately there's a 62 // flag we can pass to mmap to disable the overcommit check for 63 // this particular call, so we can get away with it as long as the 64 // overcommit flag value in /proc/sys/vm/overcommit_memory is 0 65 // ('heuristic') and not 2 (always check). 0 is the usual default 66 // value, so this should work well in general. 67 flags |= MAP_NORESERVE; 68 #endif 57 69 58 70 #if OS(DARWIN)
Note: See TracChangeset
for help on using the changeset viewer.