Bug 50588 - reserveAndCommit doesn't commit on MADVISE_FREE_REUSE systems
Summary: reserveAndCommit doesn't commit on MADVISE_FREE_REUSE systems
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Other OS X 10.5
: P2 Normal
Assignee: Geoffrey Garen
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-06 14:17 PST by Geoffrey Garen
Modified: 2010-12-06 15:14 PST (History)
0 users

See Also:


Attachments
Patch (5.36 KB, patch)
2010-12-06 14:18 PST, Geoffrey Garen
mjs: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Geoffrey Garen 2010-12-06 14:17:17 PST
reserveAndCommit doesn't commit on MADVISE_FREE_REUSE systems
Comment 1 Geoffrey Garen 2010-12-06 14:18:51 PST
Created attachment 75734 [details]
Patch
Comment 2 Geoffrey Garen 2010-12-06 14:20:05 PST
Ignore that WebKitTools change -- it's a webkit-patch artifact.
Comment 3 Maciej Stachowiak 2010-12-06 14:35:49 PST
Comment on attachment 75734 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=75734&action=review

Looks good. See two comments inline. Make sure to dro the DumpRenderTree changes and it's r=me.

> JavaScriptCore/wtf/OSAllocatorPosix.cpp:43
> +    // MADV_FREE_REUSE reservations start out in the MADV_FREE_REUSE state, but
> +    // the reserve() API promises something in the MADV_FREE_REUSABLE state.

This comment confuses me. I guess there is a relevant difference between FREE_REUSE and FREE_REUSABLE which should be highlighted here, but it's not explained. May want to tweak it.

> WebKitTools/DumpRenderTree/mac/DumpRenderTree.mm:-353
> -    // maps expected result <= JavaScript expression
> -    NSDictionary *expressions = [NSDictionary dictionaryWithObjectsAndKeys:
> -        @"0", @"0", 
> -        @"0", @"'0'", 
> -        @"", @"",
> -        @"", @"''", 
> -        @"", @"new String()", 
> -        @"", @"new String('0')", 
> -        @"", @"throw 1", 
> -        @"", @"{ }", 
> -        @"", @"[ ]", 
> -        @"", @"//", 
> -        @"", @"a.b.c", 
> -        @"", @"(function() { throw 'error'; })()", 
> -        @"", @"null",
> -        @"", @"undefined",
> -        @"true", @"true",
> -        @"false", @"false",
> -        nil
> -    ];
> -
> -    NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];

I don't think this, or the other DumpRenderTree changes, were intended.
Comment 4 Geoffrey Garen 2010-12-06 15:14:22 PST
Committed revision 73405.