Changeset 139812 in webkit


Ignore:
Timestamp:
Jan 15, 2013 5:33:30 PM (11 years ago)
Author:
psolanki@apple.com
Message:

Use MADV_FREE_REUSABLE to return JIT memory to OS
https://bugs.webkit.org/show_bug.cgi?id=106830
<rdar://problem/11437701>

Reviewed by Geoffrey Garen.

Use MADV_FREE_REUSABLE to return JIT memory on OSes that have the underlying madvise bug
fixed.

  • jit/ExecutableAllocatorFixedVMPool.cpp:

(JSC::FixedVMPoolExecutableAllocator::notifyPageIsFree):

Location:
trunk/Source/JavaScriptCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r139799 r139812  
     12013-01-15  Pratik Solanki  <psolanki@apple.com>
     2
     3        Use MADV_FREE_REUSABLE to return JIT memory to OS
     4        https://bugs.webkit.org/show_bug.cgi?id=106830
     5        <rdar://problem/11437701>
     6
     7        Reviewed by Geoffrey Garen.
     8
     9        Use MADV_FREE_REUSABLE to return JIT memory on OSes that have the underlying madvise bug
     10        fixed.
     11
     12        * jit/ExecutableAllocatorFixedVMPool.cpp:
     13        (JSC::FixedVMPoolExecutableAllocator::notifyPageIsFree):
     14
    1152013-01-15  Levi Weintraub  <leviw@chromium.org>
    216
  • trunk/Source/JavaScriptCore/jit/ExecutableAllocatorFixedVMPool.cpp

    r130014 r139812  
    4141#endif
    4242
     43#if !PLATFORM(IOS) && PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED < 1090
     44// MADV_FREE_REUSABLE does not work for JIT memory on older OSes so use MADV_FREE in that case.
     45#define WTF_USE_MADV_FREE_FOR_JIT_MEMORY 1
     46#endif
     47
    4348using namespace WTF;
    4449
     
    7580    virtual void notifyNeedPage(void* page)
    7681    {
    77 #if OS(DARWIN)
     82#if USE(MADV_FREE_FOR_JIT_MEMORY)
    7883        UNUSED_PARAM(page);
    7984#else
     
    8489    virtual void notifyPageIsFree(void* page)
    8590    {
    86 #if OS(DARWIN)
     91#if USE(MADV_FREE_FOR_JIT_MEMORY)
    8792        for (;;) {
    8893            int result = madvise(page, pageSize(), MADV_FREE);
Note: See TracChangeset for help on using the changeset viewer.