Changeset 92231 in webkit
- Timestamp:
- Aug 2, 2011 2:19:05 PM (13 years ago)
- Location:
- trunk/Source
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r92230 r92231 1 2011-08-01 Michael Saboff <msaboff@apple.com> 2 3 Virtual copying of FastMalloc allocated memory causes madvise MADV_FREE_REUSABLE errors 4 https://bugs.webkit.org/show_bug.cgi?id=65502 5 6 Reviewed by Anders Carlsson. 7 8 With the fix of the issues causing madvise MADV_FREE_REUSABLE to fail, 9 added an assert to the return code of madvise to catch any regressions. 10 11 * wtf/TCSystemAlloc.cpp: 12 (TCMalloc_SystemRelease): 13 1 14 2011-08-02 Anders Carlsson <andersca@apple.com> 2 15 -
trunk/Source/JavaScriptCore/wtf/TCSystemAlloc.cpp
r76716 r92231 393 393 void TCMalloc_SystemRelease(void* start, size_t length) 394 394 { 395 while (madvise(start, length, MADV_FREE_REUSABLE) == -1 && errno == EAGAIN) { } 395 int madviseResult; 396 397 while ((madviseResult = madvise(start, length, MADV_FREE_REUSABLE)) == -1 && errno == EAGAIN) { } 398 399 // Although really advisory, if madvise fail, we want to know about it. 400 ASSERT_UNUSED(madviseResult, madviseResult != -1); 396 401 } 397 402 -
trunk/Source/WebCore/ChangeLog
r92227 r92231 1 2011-08-01 Michael Saboff <msaboff@apple.com> 2 3 Virtual copying of FastMalloc allocated memory causes madvise MADV_FREE_REUSABLE errors 4 https://bugs.webkit.org/show_bug.cgi?id=65502 5 6 Reviewed by Anders Carlsson. 7 8 Change the vm_copy in PurgeableBuffer::create to be a memcpy. The 9 vm_copy causes the process to have additional references to the same 10 memory region. These additional reference caused madvise(MADV_FREE_REUSABLE) 11 to fail when it encountered such pages. 12 13 No tests added this is a resource defect and not a functional issue. 14 15 * platform/mac/PurgeableBufferMac.cpp: 16 (WebCore::PurgeableBuffer::create): 17 1 18 2011-08-02 Stephen White <senorblanco@chromium.org> 2 19 -
trunk/Source/WebCore/platform/mac/PurgeableBufferMac.cpp
r85603 r92231 65 65 return nullptr; 66 66 67 ret = vm_copy(mach_task_self(), reinterpret_cast<vm_address_t>(data), size, buffer); 68 69 ASSERT(ret == KERN_SUCCESS); 70 if (ret != KERN_SUCCESS) { 71 vm_deallocate(mach_task_self(), buffer, size); 72 return nullptr; 73 } 67 memcpy(reinterpret_cast<char*>(buffer), data, size); 74 68 75 69 return adoptPtr(new PurgeableBuffer(reinterpret_cast<char*>(buffer), size)); -
trunk/Source/WebKit2/ChangeLog
r92199 r92231 1 2011-08-01 Michael Saboff <msaboff@apple.com> 2 3 Virtual copying of FastMalloc allocated memory causes madvise MADV_FREE_REUSABLE errors 4 https://bugs.webkit.org/show_bug.cgi?id=65502 5 6 Reviewed by Anders Carlsson. 7 8 Changed OOL message to use MACH_MSG_PHYSICAL_COPY flag instead of virtual flag 9 so that the original memory region isn't referenced by the message and ultimately 10 the receiving process. The additional reference caused madvise(MADV_FREE_REUSABLE) 11 to fail when it encountered such pages. 12 13 * Platform/CoreIPC/mac/ConnectionMac.cpp: 14 (CoreIPC::Connection::sendOutgoingMessage): 15 1 16 2011-07-29 Jocelyn Turcotte <jocelyn.turcotte@nokia.com> 2 17 -
trunk/Source/WebKit2/Platform/CoreIPC/mac/ConnectionMac.cpp
r78247 r92231 156 156 messageBodyIsOOL = true; 157 157 158 attachments.append(Attachment(arguments->buffer(), arguments->bufferSize(), MACH_MSG_ VIRTUAL_COPY, false));158 attachments.append(Attachment(arguments->buffer(), arguments->bufferSize(), MACH_MSG_PHYSICAL_COPY, false)); 159 159 numberOfOOLMemoryDescriptors++; 160 160 messageSize = machMessageSize(0, numberOfPortDescriptors, numberOfOOLMemoryDescriptors);
Note: See TracChangeset
for help on using the changeset viewer.