Ignore:
Timestamp:
Dec 1, 2008, 1:14:06 PM (16 years ago)
Author:
Antti Koivisto
Message:

2008-11-30 Antti Koivisto <Antti Koivisto>

Reviewed by Mark Rowe.


Try to return free pages in the current thread cache too.

  • wtf/FastMalloc.cpp: (WTF::TCMallocStats::releaseFastMallocFreeMemory):
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/wtf/FastMalloc.cpp

    r38853 r38866  
    38463846void releaseFastMallocFreeMemory()
    38473847{
     3848    // Flush free pages in the current thread cache back to the page heap.
     3849    // Low watermark mechanism in Scavenge() prevents full return on the first pass.
     3850    // The second pass flushes everything.
     3851    if (TCMalloc_ThreadCache* threadCache = TCMalloc_ThreadCache::GetCacheIfPresent()) {
     3852        threadCache->Scavenge();
     3853        threadCache->Scavenge();
     3854    }
     3855
    38483856    SpinLockHolder h(&pageheap_lock);
    38493857    pageheap->ReleaseFreePages();
Note: See TracChangeset for help on using the changeset viewer.