RESOLVED INVALID 43515
Fix small design issues with PageAllocation, split out PageReservation.
https://bugs.webkit.org/show_bug.cgi?id=43515
Summary Fix small design issues with PageAllocation, split out PageReservation.
Gavin Barraclough
Reported Wednesday, August 4, 2010 11:28:32 PM UTC
The PageAllocation class has a number of issues. * Changes in bug #43269 accidentally switched SYMBIAN over to use malloc/free to allocate blocks of memory for the GC heap, instead of allocating RChunks. Revert this change in behaviour. * In order for PageAllocation to work correctly on WinCE we should be decommitting memory before deallocating. In order to simplify understanding the expected state at deallocate, split behaviour out into PageAllocation and PageReservation classes. Require that all memory be decommitted before calling deallocate on a PageReservation, add asserts to enforce this. * add many missing asserts. * inline more functions. * remove ability to create sub-PageAllocations from an existing PageAllocations object – this presented an interface that would allow sub regions to be deallocated, which would not have provided expected behaviour. * remove writable/executable arguments to commit, this value can be cached at the point the memory is reserved. * remove writable/executable arguments to allocateAligned, protection other than RW is not supported. * add missing checks for overflow & failed allocation to mmap path through allocateAligned.
Attachments
The patch (60.64 KB, patch)
2010-08-04 15:41 PDT, Gavin Barraclough
no flags
Gavin Barraclough
Comment 1 Wednesday, August 4, 2010 11:41:12 PM UTC
Created attachment 63504 [details] The patch
WebKit Review Bot
Comment 2 Wednesday, August 4, 2010 11:43:26 PM UTC
Attachment 63504 [details] did not pass style-queue: Failed to run "['WebKitTools/Scripts/check-webkit-style']" exit_code: 1 JavaScriptCore/wtf/PageAllocation.h:49: Alphabetical sorting problem. [build/include_order] [4] JavaScriptCore/wtf/PageAllocation.h:319: system_info is incorrectly named. Don't use underscores in your identifier names. [readability/naming] [4] JavaScriptCore/wtf/PageAllocation.h:348: page_size is incorrectly named. Don't use underscores in your identifier names. [readability/naming] [4] JavaScriptCore/runtime/Collector.h:62: BLOCK_SIZE is incorrectly named. Don't use underscores in your identifier names. [readability/naming] [4] Total errors found: 4 in 16 files If any of these errors are false positives, please file a bug against check-webkit-style.
Gavin Barraclough
Comment 3 Thursday, August 5, 2010 1:22:25 AM UTC
Fixed in r64695.
Andrew Wilson
Comment 4 Thursday, August 5, 2010 1:44:57 AM UTC
Looks like this breaks the windows build: 1: c:\b\slave\webkit-rel-webkit-org\build\src\third_party\webkit\javascriptcore\wtf\PageReservation.h(220) : error C2597: illegal reference to non-static member 'WTF::PageReservation::m_protection' 2: c:\b\slave\webkit-rel-webkit-org\build\src\third_party\webkit\javascriptcore\wtf\PageReservation.h(221) : error C2597: illegal reference to non-static member 'WTF::PageReservation::m_protection' I'm going to roll this out.
Adam Barth
Comment 5 Wednesday, August 11, 2010 7:00:46 AM UTC
Comment on attachment 63504 [details] The patch Clearing sam's r+. Looks like we'll need a new patch here.
Siddharth Mathur
Comment 6 Wednesday, December 15, 2010 4:22:46 PM UTC
Gavin, Could you please let us know if you intend to revisit this patch (the Symbian change specifically), or should we do it as part of Bug 51108? Either way is fine. Thanks!
Gavin Barraclough
Comment 7 Friday, December 17, 2010 10:09:21 PM UTC
Hi Siddharth, I'm afraid I'm not going to have a chance to look at this again in the near future, I think Geoff has made some major changes to PageAllocation lately, so I doubt this patch can be merged up easily, I expect any fix will need a fresh implementation on ToT. cheers, G.
Siddharth Mathur
Comment 8 Thursday, January 27, 2011 6:16:52 PM UTC
Resolving based on comment #7
Note You need to log in before you can comment on or make changes to this bug.