Bug 138495 - bmalloc uses 8X more virtual memory than necessary
Summary: bmalloc uses 8X more virtual memory than necessary
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Geoffrey Garen
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-11-06 22:15 PST by Geoffrey Garen
Modified: 2014-11-07 10:12 PST (History)
4 users (show)

See Also:


Attachments
Patch (11.68 KB, patch)
2014-11-06 22:26 PST, Geoffrey Garen
no flags Details | Formatted Diff | Diff
Patch (11.63 KB, patch)
2014-11-07 09:59 PST, Geoffrey Garen
mark.lam: 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 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>