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.
Created attachment 63504 [details] The patch
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.
Fixed in r64695.
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.
Comment on attachment 63504 [details] The patch Clearing sam's r+. Looks like we'll need a new patch here.
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!
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.
Resolving based on comment #7