Ignore:
Timestamp:
Mar 12, 2009, 8:33:27 PM (16 years ago)
Author:
[email protected]
Message:

<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:
File:
1 edited

Legend:

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

    r34756 r41660  
    6363extern void TCMalloc_SystemRelease(void* start, size_t length);
    6464
    65 #if HAVE(VIRTUALALLOC)
    6665extern void TCMalloc_SystemCommit(void* start, size_t length);
    67 #else
     66
     67#if !HAVE(MADV_FREE_REUSE) && !HAVE(MADV_DONTNEED) && !HAVE(MMAP)
     68inline void TCMalloc_SystemRelease(void*, size_t) { }
     69#endif
     70
     71#if !HAVE(VIRTUALALLOC) && !HAVE(MADV_FREE_REUSE)
    6872inline void TCMalloc_SystemCommit(void*, size_t) { }
    6973#endif
Note: See TracChangeset for help on using the changeset viewer.