diff options
Diffstat (limited to 'JavaScriptCore/wtf/FastMalloc.h')
| -rw-r--r-- | JavaScriptCore/wtf/FastMalloc.h | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/JavaScriptCore/wtf/FastMalloc.h b/JavaScriptCore/wtf/FastMalloc.h index 74d4307..9729bc3 100644 --- a/JavaScriptCore/wtf/FastMalloc.h +++ b/JavaScriptCore/wtf/FastMalloc.h @@ -34,6 +34,7 @@ namespace WTF { void* fastCalloc(size_t numElements, size_t elementSize); void* fastRealloc(void*, size_t); char* fastStrDup(const char*); + size_t fastMallocSize(const void*); struct TryMallocReturnValue { TryMallocReturnValue(void* data) @@ -82,10 +83,9 @@ namespace WTF { void releaseFastMallocFreeMemory(); struct FastMallocStatistics { - size_t heapSize; - size_t freeSizeInHeap; - size_t freeSizeInCaches; - size_t returnedSize; + size_t reservedVMBytes; + size_t committedVMBytes; + size_t freeListBytes; }; FastMallocStatistics fastMallocStatistics(); @@ -180,16 +180,17 @@ namespace WTF { } // namespace WTF -using WTF::fastMalloc; -using WTF::fastZeroedMalloc; using WTF::fastCalloc; +using WTF::fastFree; +using WTF::fastMalloc; +using WTF::fastMallocSize; using WTF::fastRealloc; -using WTF::tryFastMalloc; -using WTF::tryFastZeroedMalloc; +using WTF::fastStrDup; +using WTF::fastZeroedMalloc; using WTF::tryFastCalloc; +using WTF::tryFastMalloc; using WTF::tryFastRealloc; -using WTF::fastFree; -using WTF::fastStrDup; +using WTF::tryFastZeroedMalloc; #ifndef NDEBUG using WTF::fastMallocForbid; @@ -206,7 +207,7 @@ using WTF::fastMallocAllow; #define WTF_PRIVATE_INLINE inline #endif -#if !defined(_CRTDBG_MAP_ALLOC) && !(defined(USE_SYSTEM_MALLOC) && USE_SYSTEM_MALLOC) +#if !defined(_CRTDBG_MAP_ALLOC) && !(defined(USE_SYSTEM_MALLOC) && USE_SYSTEM_MALLOC && !PLATFORM(BREWMP)) // The nothrow functions here are actually not all that helpful, because fastMalloc will // call CRASH() rather than returning 0, and returning 0 is what nothrow is all about. @@ -215,8 +216,7 @@ using WTF::fastMallocAllow; // debug-only code to make sure we don't use the system malloc via the default operator // new by accident. -// We musn't customize the global operator new and delete for the Qt port. -#if !PLATFORM(QT) +#if ENABLE(GLOBAL_FASTMALLOC_NEW) #if COMPILER(MSVC) #pragma warning(push) |
