Bug 195665

Summary: [bmalloc] Use MADV_FREE on FreeBSD
Product: WebKit Reporter: Yoshiaki Jitsukawa <yoshiaki.jitsukawa>
Component: New BugsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, don.olmstead, ggaren, webkit-bug-importer, yoshiaki.jitsukawa
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

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>