Changeset 207476 in webkit
- Timestamp:
- Oct 18, 2016 12:03:29 PM (8 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r207475 r207476 1 2016-10-18 Keith Miller <keith_miller@apple.com> 2 3 Cleanup Wasm memory. 4 https://bugs.webkit.org/show_bug.cgi?id=163601 5 6 Reviewed by Saam Barati. 7 8 There were a couple of issues with the original Wasm memory patch. 9 This is a follow-up patch to fix those issues. 10 11 * wasm/WASMMemory.cpp: 12 (JSC::WASM::Memory::Memory): 13 * wasm/WASMMemory.h: 14 1 15 2016-10-15 Filip Pizlo <fpizlo@apple.com> 2 16 -
trunk/Source/JavaScriptCore/wasm/WASMMemory.cpp
r207453 r207476 41 41 ASSERT(pinnedSizeRegisters.size() > 0); 42 42 43 void* result = mmap(nullptr, m_mappedCapacity, PROT_NONE, MAP_PRIVATE | MAP_ANON, 0, 0); 43 // FIXME: It would be nice if we had a VM tag for wasm memory. https://bugs.webkit.org/show_bug.cgi?id=163600 44 void* result = mmap(nullptr, m_mappedCapacity, PROT_NONE, MAP_PRIVATE | MAP_ANON, -1, 0); 44 45 if (result == MAP_FAILED) { 45 46 // Try again with a different number. 46 47 m_mappedCapacity = m_capacity; 47 result = mmap(nullptr, m_mappedCapacity, PROT_NONE, MAP_PRIVATE | MAP_ANON, 0, 0);48 result = mmap(nullptr, m_mappedCapacity, PROT_NONE, MAP_PRIVATE | MAP_ANON, -1, 0); 48 49 if (result == MAP_FAILED) 49 50 return; 50 51 } 51 52 53 ASSERT(startingSize <= m_mappedCapacity); 52 54 if (mprotect(result, startingSize, PROT_READ | PROT_WRITE)) { 53 55 munmap(result, m_mappedCapacity); -
trunk/Source/JavaScriptCore/wasm/WASMMemory.h
r207453 r207476 40 40 41 41 // FIXME: We should support more than one memory size register. Right now we take a vector with only one 42 // entry. Specifically an e xtry where the sizeOffset == 0. If we have more than one size register,42 // entry. Specifically an entry where the sizeOffset == 0. If we have more than one size register, 43 43 // we can have one for each load size class. see: https://bugs.webkit.org/show_bug.cgi?id=162952 44 44 struct PinnedRegisterInfo {
Note: See TracChangeset
for help on using the changeset viewer.