Changeset 43988 in webkit for trunk/JavaScriptCore/wtf/Platform.h


Ignore:
Timestamp:
May 21, 2009, 3:12:39 PM (16 years ago)
Author:
[email protected]
Message:

2009-05-21 Cameron Zwarich <[email protected]>

Reviewed by Mark Rowe.

Bug 25945: Add support for MADV_FREE to TCMalloc
<https://bugs.webkit.org/show_bug.cgi?id=25945>
<rdar://problem/6910754>

Add support for MADV_FREE to TCMalloc_SystemRelease for platforms that
don't also support MADV_FREE_REUSE. The code is identical to the MADV_DONTNEED
case except for the advice passed to madvise(), so combining the two cases
makes the most sense.

  • wtf/Platform.h: Only define HAVE_MADV_FREE when not building on Tiger or Leopard, because while it is defined on these platforms it actually does nothing.
  • wtf/TCSystemAlloc.cpp: (TCMalloc_SystemRelease): use MADV_FREE if it is available; otherwise use MADV_DONTNEED.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/wtf/Platform.h

    r43626 r43988  
    366366#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD)
    367367#define HAVE_MADV_FREE_REUSE 1
    368 #endif
    369 
    370368#define HAVE_MADV_FREE 1
     369#endif
    371370
    372371#elif PLATFORM(WIN_OS)
Note: See TracChangeset for help on using the changeset viewer.