Summary: | Virtual copying of FastMalloc allocated memory causes madvise MADV_FREE_REUSABLE errors | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Michael Saboff <msaboff> | ||||
Component: | WebCore Misc. | Assignee: | Michael Saboff <msaboff> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | psolanki | ||||
Priority: | P2 | Keywords: | InRadar | ||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | Mac | ||||||
OS: | All | ||||||
Attachments: |
|
Description
Michael Saboff
2011-08-01 17:44:38 PDT
Created attachment 102602 [details]
Proposed patch
Two defects in Radar: <rdar://problem/9747241> and <rdar://problem/9747279>. Comment on attachment 102602 [details] Proposed patch View in context: https://bugs.webkit.org/attachment.cgi?id=102602&action=review > Source/WebCore/platform/mac/PurgeableBufferMac.cpp:67 > + memcpy(reinterpret_cast<char*>(buffer), data, size); Since memcpy’s destination is a void* I would not expect you’d need to typecast a pointer to use it as a memcpy destination. Can you just pass buffer without a typecast? (In reply to comment #3) > (From update of attachment 102602 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=102602&action=review > > > Source/WebCore/platform/mac/PurgeableBufferMac.cpp:67 > > + memcpy(reinterpret_cast<char*>(buffer), data, size); > > Since memcpy’s destination is a void* I would not expect you’d need to typecast a pointer to use it as a memcpy destination. Can you just pass buffer without a typecast? The cast is needed because vm_address_t is really a uintptr_t which is an unsigned long, a non-pointer type. Committed r92231: <http://trac.webkit.org/changeset/92231> |