Changeset 34028 in webkit for trunk/JavaScriptCore/wtf


Ignore:
Timestamp:
May 22, 2008, 11:40:38 AM (17 years ago)
Author:
[email protected]
Message:

<rdar://problem/5954233> Add method to release free memory from FastMalloc

Patch suggested by Mark Rowe. Rubber-stamped by Maciej.

  • JavaScriptCore.exp: Export _releaseFastMallocFreeMemory.
  • wtf/FastMalloc.cpp: (WTF::TCMallocStats::): Added releaseFastMallocFreeMemory() for both system malloc and FastMalloc code paths.
  • wtf/FastMalloc.h: Define releaseFastMallocFreeMemory().
Location:
trunk/JavaScriptCore/wtf
Files:
2 edited

Legend:

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

    r31049 r34028  
    197197} // namespace WTF
    198198
     199extern "C" {
     200void releaseFastMallocFreeMemory() { }
     201}
     202
    199203#if PLATFORM(DARWIN)
    200204// This symbol is present in the JavaScriptCore exports file even when FastMalloc is disabled.
     
    36243628}
    36253629
     3630extern "C" {
     3631void releaseFastMallocFreeMemory()
     3632{
     3633    SpinLockHolder h(&pageheap_lock);
     3634    pageheap->ReleaseFreePages();
     3635}
     3636}
     3637
    36263638#endif
    36273639
  • trunk/JavaScriptCore/wtf/FastMalloc.h

    r27712 r34028  
    7171WTF_PRIVATE_INLINE void* operator new[](size_t s) { return fastMalloc(s); }
    7272WTF_PRIVATE_INLINE void operator delete[](void* p) { fastFree(p); }
     73
     74extern "C" {
     75void releaseFastMallocFreeMemory();
     76}
    7377#endif
    7478
Note: See TracChangeset for help on using the changeset viewer.