<rdar://problem/6548446> TCMalloc_SystemRelease should use madvise rather than re...
authormrowe@apple.com <mrowe@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 13 Mar 2009 03:33:27 +0000 (03:33 +0000)
committermrowe@apple.com <mrowe@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 13 Mar 2009 03:33:27 +0000 (03:33 +0000)
commitf5f54093a1b4dbacfb0c2b304b11d8c65b4c361a
treee8a7549d0401e6b6852993e4bee20d79d388f4c2
parent0a19d78818ee3eb8b3f8cbcdf4bb59b6cb1413b4
<rdar://problem/6548446> TCMalloc_SystemRelease should use madvise rather than re-mmaping span of pages

* wtf/FastMalloc.cpp:
(WTF::mergeDecommittedStates): If either of the spans has been released to the system, release the other
span as well so that the flag in the merged span is accurate.
* wtf/Platform.h:
* wtf/TCSystemAlloc.cpp: Track decommitted spans when using MADV_FREE_REUSABLE / MADV_FREE_REUSE.
(TCMalloc_SystemRelease): Use madvise with MADV_FREE_REUSABLE when it is available.
(TCMalloc_SystemCommit): Use madvise with MADV_FREE_REUSE when it is available.
* wtf/TCSystemAlloc.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@41660 268f45cc-cd09-0410-ab3c-d52691b4dbfc
JavaScriptCore/ChangeLog
JavaScriptCore/wtf/FastMalloc.cpp
JavaScriptCore/wtf/Platform.h
JavaScriptCore/wtf/TCSystemAlloc.cpp
JavaScriptCore/wtf/TCSystemAlloc.h