[bmalloc] Use MADV_FREE on FreeBSD
authoryoshiaki.jitsukawa@sony.com <yoshiaki.jitsukawa@sony.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 13 Mar 2019 23:07:06 +0000 (23:07 +0000)
committeryoshiaki.jitsukawa@sony.com <yoshiaki.jitsukawa@sony.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 13 Mar 2019 23:07:06 +0000 (23:07 +0000)
commit8ab925e8a408c7b00b367c186bbd6db7969488eb
treecd192d8c74159c48e6f26bd435e80f6fec4b1199
parentcfeca5fbc471f1a4d24e016c43779405db2d93ce
[bmalloc] Use MADV_FREE on FreeBSD
https://bugs.webkit.org/show_bug.cgi?id=195665

Reviewed by Geoffrey Garen.

* bmalloc/BPlatform.h:

Introduce BOS_FREEBSD, which is equivalent to WTF_OS_FREEBSD

* bmalloc/VMAllocate.h:
(bmalloc::vmDeallocatePhysicalPages):

Use MADV_FREE instead of MADV_DONTNEED if BOS(FREEBSD), since on FreeBSD,
unlike on Linux, MADV_DONTNEED doesn't let the OS discard the contents of
the pages.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@242916 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/bmalloc/ChangeLog
Source/bmalloc/bmalloc/BPlatform.h
Source/bmalloc/bmalloc/VMAllocate.h