Bug 138495

Summary: bmalloc uses 8X more virtual memory than necessary
Product: WebKit Reporter: Geoffrey Garen <ggaren>
Component: New BugsAssignee: Geoffrey Garen <ggaren>
Status: RESOLVED FIXED    
Severity: Normal CC: benjamin, kling, mark.lam, sam
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch mark.lam: review+

Description Geoffrey Garen 2014-11-06 22:15:32 PST
bmalloc uses 8X more virtual memory than necessary
Comment 1 Geoffrey Garen 2014-11-06 22:26:19 PST
Created attachment 241163 [details]
Patch
Comment 2 Mark Lam 2014-11-07 01:23:34 PST
Comment on attachment 241163 [details]
Patch

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

> Source/bmalloc/bmalloc/VMAllocate.h:96
> +    char* aligned = mask(mapped, ~vmAlignmentMask) + vmAlignment;

I think this should be:
    char* aligned = mask(mapped + vmAlignment, ~vmAlignmentMask);

i.e. the same algorithm as roundUpToMultipleOf().
Comment 3 Geoffrey Garen 2014-11-07 09:59:21 PST
> i.e. the same algorithm as roundUpToMultipleOf().

Good idea. I'll just use roundUpToMultipleOf directly.
Comment 4 Geoffrey Garen 2014-11-07 09:59:49 PST
Created attachment 241189 [details]
Patch
Comment 5 Mark Lam 2014-11-07 10:01:14 PST
Comment on attachment 241189 [details]
Patch

r=me
Comment 6 Geoffrey Garen 2014-11-07 10:12:31 PST
Committed r175751: <http://trac.webkit.org/changeset/175751>