Changeset 223950 in webkit
- Timestamp:
- Oct 24, 2017 11:55:36 PM (6 years ago)
- Location:
- trunk/Source/bmalloc
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/bmalloc/ChangeLog
r223936 r223950 1 2017-10-24 Zan Dobersek <zdobersek@igalia.com> 2 3 [Linux] Enable Gigacage in x64 Linux environment 4 https://bugs.webkit.org/show_bug.cgi?id=177745 5 <rdar://problem/34773148> 6 7 Reviewed by Yusuke Suzuki. 8 9 Re-enable Gigacage on x86_64 Linux platforms after it was disabled in 223877. 10 11 The cause for the revert was problems with huge coredumps being generated 12 while Gigacage was enabled. The feature virtually allocates about 80GB of 13 memory at the beginning of the process lifetime. This is not a problem in 14 itself since the memory range is marked as not needed through madvise(), 15 but all this memory was still included upon core dump generation on Linux. 16 Since there are reasonable limits enforced upon core dumps, these were 17 being truncated every time, not yielding any useful information. 18 19 To avoid this, on Linux, invocations of madvise() with the MADV_NORMAL and 20 MADV_DONTNEED advice parameters should be accompanied with respectively 21 matching MADV_DODUMP and MADV_DONTDUMP madvise() calls. This correctly 22 avoids core-dumping any memory that's not yet been physically allocated. 23 24 * bmalloc/Gigacage.h: 25 * bmalloc/VMAllocate.h: 26 (bmalloc::vmDeallocatePhysicalPages): 27 (bmalloc::vmAllocatePhysicalPages): 28 1 29 2017-10-24 David Kilzer <ddkilzer@apple.com> 2 30 -
trunk/Source/bmalloc/bmalloc/Gigacage.h
r223877 r223950 53 53 #define STRING_GIGACAGE_MASK GIGACAGE_SIZE_TO_MASK(STRING_GIGACAGE_SIZE) 54 54 55 #if (BOS(DARWIN) && (BCPU(ARM64) || BCPU(X86_64))) 55 #if (BOS(DARWIN) && (BCPU(ARM64) || BCPU(X86_64))) || (BOS(LINUX) && BCPU(X86_64)) 56 56 #define GIGACAGE_ENABLED 1 57 57 #else -
trunk/Source/bmalloc/bmalloc/VMAllocate.h
r223936 r223950 194 194 #else 195 195 SYSCALL(madvise(p, vmSize, MADV_DONTNEED)); 196 #if BOS(LINUX) 197 SYSCALL(madvise(p, vmSize, MADV_DONTDUMP)); 198 #endif 196 199 #endif 197 200 } … … 204 207 #else 205 208 SYSCALL(madvise(p, vmSize, MADV_NORMAL)); 209 #if BOS(LINUX) 210 SYSCALL(madvise(p, vmSize, MADV_DODUMP)); 211 #endif 206 212 #endif 207 213 }
Note: See TracChangeset
for help on using the changeset viewer.