diff options
author | Kent Hansen <khansen@trolltech.com> | 2009-07-28 15:32:59 (GMT) |
---|---|---|
committer | Kent Hansen <khansen@trolltech.com> | 2009-07-28 15:32:59 (GMT) |
commit | 14aa95bf83e8fa91151b5edd3c346c20d942eb81 (patch) | |
tree | 46ec6389eb1590e0a018c4acbfba670d315987ba /src/3rdparty/webkit/JavaScriptCore/wtf/FastMalloc.cpp | |
parent | 1c72e77e43593dfea6c6392d1058e63762efb534 (diff) | |
parent | f340825f35ad3de28685f4890cd73bbf9bb6c0e6 (diff) | |
download | Qt-14aa95bf83e8fa91151b5edd3c346c20d942eb81.zip Qt-14aa95bf83e8fa91151b5edd3c346c20d942eb81.tar.gz Qt-14aa95bf83e8fa91151b5edd3c346c20d942eb81.tar.bz2 |
Merge branch 'qtwebkit-4.6-staging' into qtscript-jsc-backend
Conflicts:
src/corelib/tools/qregexp.cpp
src/script/qscriptengine.cpp
src/script/qscriptvalue.cpp
Diffstat (limited to 'src/3rdparty/webkit/JavaScriptCore/wtf/FastMalloc.cpp')
-rw-r--r-- | src/3rdparty/webkit/JavaScriptCore/wtf/FastMalloc.cpp | 25 |
1 files changed, 1 insertions, 24 deletions
diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/FastMalloc.cpp b/src/3rdparty/webkit/JavaScriptCore/wtf/FastMalloc.cpp index d6850e6..c855a41 100644 --- a/src/3rdparty/webkit/JavaScriptCore/wtf/FastMalloc.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/wtf/FastMalloc.cpp @@ -95,8 +95,6 @@ #define FORCE_SYSTEM_MALLOC 1 #endif -#define TCMALLOC_TRACK_DECOMMITED_SPANS (HAVE(VIRTUALALLOC) || HAVE(MADV_FREE_REUSE)) - #ifndef NDEBUG namespace WTF { @@ -1043,11 +1041,7 @@ struct Span { #endif }; -#if TCMALLOC_TRACK_DECOMMITED_SPANS #define ASSERT_SPAN_COMMITTED(span) ASSERT(!span->decommitted) -#else -#define ASSERT_SPAN_COMMITTED(span) -#endif #ifdef SPAN_HISTORY void Event(Span* span, char op, int v = 0) { @@ -1369,12 +1363,10 @@ inline Span* TCMalloc_PageHeap::New(Length n) { Span* result = ll->next; Carve(result, n, released); -#if TCMALLOC_TRACK_DECOMMITED_SPANS if (result->decommitted) { TCMalloc_SystemCommit(reinterpret_cast<void*>(result->start << kPageShift), static_cast<size_t>(n << kPageShift)); result->decommitted = false; } -#endif ASSERT(Check()); free_pages_ -= n; return result; @@ -1431,12 +1423,10 @@ Span* TCMalloc_PageHeap::AllocLarge(Length n) { if (best != NULL) { Carve(best, n, from_released); -#if TCMALLOC_TRACK_DECOMMITED_SPANS if (best->decommitted) { TCMalloc_SystemCommit(reinterpret_cast<void*>(best->start << kPageShift), static_cast<size_t>(n << kPageShift)); best->decommitted = false; } -#endif ASSERT(Check()); free_pages_ -= n; return best; @@ -1461,14 +1451,10 @@ Span* TCMalloc_PageHeap::Split(Span* span, Length n) { return leftover; } -#if !TCMALLOC_TRACK_DECOMMITED_SPANS -static ALWAYS_INLINE void propagateDecommittedState(Span*, Span*) { } -#else static ALWAYS_INLINE void propagateDecommittedState(Span* destination, Span* source) { destination->decommitted = source->decommitted; } -#endif inline void TCMalloc_PageHeap::Carve(Span* span, Length n, bool released) { ASSERT(n > 0); @@ -1495,9 +1481,6 @@ inline void TCMalloc_PageHeap::Carve(Span* span, Length n, bool released) { } } -#if !TCMALLOC_TRACK_DECOMMITED_SPANS -static ALWAYS_INLINE void mergeDecommittedStates(Span*, Span*) { } -#else static ALWAYS_INLINE void mergeDecommittedStates(Span* destination, Span* other) { if (destination->decommitted && !other->decommitted) { @@ -1509,7 +1492,6 @@ static ALWAYS_INLINE void mergeDecommittedStates(Span* destination, Span* other) destination->decommitted = true; } } -#endif inline void TCMalloc_PageHeap::Delete(Span* span) { ASSERT(Check()); @@ -1556,15 +1538,12 @@ inline void TCMalloc_PageHeap::Delete(Span* span) { Event(span, 'D', span->length); span->free = 1; -#if TCMALLOC_TRACK_DECOMMITED_SPANS if (span->decommitted) { if (span->length < kMaxPages) DLL_Prepend(&free_[span->length].returned, span); else DLL_Prepend(&large_.returned, span); - } else -#endif - { + } else { if (span->length < kMaxPages) DLL_Prepend(&free_[span->length].normal, span); else @@ -1596,9 +1575,7 @@ void TCMalloc_PageHeap::IncrementalScavenge(Length n) { DLL_Remove(s); TCMalloc_SystemRelease(reinterpret_cast<void*>(s->start << kPageShift), static_cast<size_t>(s->length << kPageShift)); -#if TCMALLOC_TRACK_DECOMMITED_SPANS s->decommitted = true; -#endif DLL_Prepend(&slist->returned, s); scavenge_counter_ = std::max<size_t>(64UL, std::min<size_t>(kDefaultReleaseDelay, kDefaultReleaseDelay - (free_pages_ / kDefaultReleaseDelay))); |