Bug 195665 - [bmalloc] Use MADV_FREE on FreeBSD
Summary: [bmalloc] Use MADV_FREE on FreeBSD
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-03-13 00:07 PDT by Yoshiaki Jitsukawa
Modified: 2019-03-13 16:11 PDT (History)
5 users (show)

See Also:


Attachments
Patch (1.60 KB, patch)
2019-03-13 00:17 PDT, Yoshiaki Jitsukawa
no flags Details | Formatted Diff | Diff
Patch (2.03 KB, patch)
2019-03-13 15:22 PDT, Yoshiaki Jitsukawa
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yoshiaki Jitsukawa 2019-03-13 00:07:52 PDT
[bmalloc] Use MADV_FREE for non Darwin/Linux OS if available
Comment 1 Yoshiaki Jitsukawa 2019-03-13 00:17:39 PDT
Created attachment 364517 [details]
Patch
Comment 2 Geoffrey Garen 2019-03-13 10:44:49 PDT
Comment on attachment 364517 [details]
Patch

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

> Source/bmalloc/bmalloc/VMAllocate.h:204
> +#else

Can this be #elif?

> Source/bmalloc/bmalloc/VMAllocate.h:205
> +#if !BOS(LINUX) && defined(MADV_FREE)

We do have a platform macro for FreeBSD. Can you use that?
Comment 3 Yoshiaki Jitsukawa 2019-03-13 15:12:02 PDT
(In reply to Geoffrey Garen from comment #2)
> Comment on attachment 364517 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=364517&action=review
> 
> > Source/bmalloc/bmalloc/VMAllocate.h:204
> > +#else
> 
> Can this be #elif?
> 
> > Source/bmalloc/bmalloc/VMAllocate.h:205
> > +#if !BOS(LINUX) && defined(MADV_FREE)
> 
> We do have a platform macro for FreeBSD. Can you use that?

Thanks. I'll introduce BOS_FREEBSD like WTF's WTF_OS_FREEBSD.
Comment 4 Yoshiaki Jitsukawa 2019-03-13 15:22:52 PDT
Created attachment 364583 [details]
Patch
Comment 5 Geoffrey Garen 2019-03-13 15:29:21 PDT
Comment on attachment 364583 [details]
Patch

r=me
Comment 6 WebKit Commit Bot 2019-03-13 16:07:11 PDT
Comment on attachment 364583 [details]
Patch

Clearing flags on attachment: 364583

Committed r242916: <https://trac.webkit.org/changeset/242916>
Comment 7 WebKit Commit Bot 2019-03-13 16:07:13 PDT
All reviewed patches have been landed.  Closing bug.
Comment 8 Radar WebKit Bug Importer 2019-03-13 16:11:05 PDT
<rdar://problem/48868091>