Bug 194836 - [bmalloc] bmalloc::Heap is allocated even though we use system malloc mode
Summary: [bmalloc] bmalloc::Heap is allocated even though we use system malloc mode
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: bmalloc (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Yusuke Suzuki
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-02-19 15:29 PST by Yusuke Suzuki
Modified: 2019-02-20 16:04 PST (History)
6 users (show)

See Also:


Attachments
Patch (23.04 KB, patch)
2019-02-19 21:22 PST, Yusuke Suzuki
no flags Details | Formatted Diff | Diff
Patch (23.17 KB, patch)
2019-02-19 21:43 PST, Yusuke Suzuki
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 Yusuke Suzuki 2019-02-19 15:29:33 PST
...
Comment 1 Yusuke Suzuki 2019-02-19 21:22:10 PST
Created attachment 362481 [details]
Patch
Comment 2 Yusuke Suzuki 2019-02-19 21:43:56 PST
Created attachment 362482 [details]
Patch
Comment 3 Mark Lam 2019-02-19 22:04:41 PST
Comment on attachment 362482 [details]
Patch

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

r=me.  Can you run PerformanceTests/MallocBench just to be sure that there's no significant perf difference?

> Source/bmalloc/bmalloc/bmalloc.cpp:71
> +        {
> +            std::unique_lock<Mutex> lock(Heap::mutex());
> +            result = heap.tryAllocateLarge(lock, alignment, size);
> +            if (result) {
> +                // Don't track this as dirty memory that dictates how we drive the scavenger.
> +                // FIXME: We should make it so that users of this API inform bmalloc which
> +                // pages they dirty:
> +                // https://bugs.webkit.org/show_bug.cgi?id=184207
> +                heap.externalDecommit(lock, result, size);
> +            }
>          }

No need to indent one more level here.  You're already inside a scope unlike before.
Comment 4 Yusuke Suzuki 2019-02-20 15:39:20 PST
Comment on attachment 362482 [details]
Patch

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

I ran MallocBench and it was performance neutral.

>> Source/bmalloc/bmalloc/bmalloc.cpp:71
>>          }
> 
> No need to indent one more level here.  You're already inside a scope unlike before.

Fixed, thanks.
Comment 5 Yusuke Suzuki 2019-02-20 16:03:27 PST
Committed r241847: <https://trac.webkit.org/changeset/241847>
Comment 6 Radar WebKit Bug Importer 2019-02-20 16:04:40 PST
<rdar://problem/48256231>