[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.21-1-589-gf276b90
Gustavo Noronha Silva
kov at debian.org
Fri Feb 26 22:22:59 UTC 2010
The following commit has been merged in the debian/unstable branch:
commit f276b905c97adb81043d160eb32587b338c25e64
Merge: 7d17537dde88c1cac14cb6234c883ba09d36b2ff 1e41756b68be8a07c3f4b256a395a85910c3aa55
Author: Gustavo Noronha Silva <kov at debian.org>
Date: Fri Feb 26 19:22:32 2010 -0300
Merge branch 'webkit-1.1' into debian/unstable
Conflicts:
WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp
diff --combined JavaScriptCore/wtf/FastMalloc.cpp
index 76e680f,7a1ffb6..159fc5e
--- a/JavaScriptCore/wtf/FastMalloc.cpp
+++ b/JavaScriptCore/wtf/FastMalloc.cpp
@@@ -204,6 -204,10 +204,10 @@@ TryMallocReturnValue tryFastZeroedMallo
#if FORCE_SYSTEM_MALLOC
+ #if PLATFORM(BREWMP)
+ #include "brew/SystemMallocBrew.h"
+ #endif
+
namespace WTF {
TryMallocReturnValue tryFastMalloc(size_t n)
@@@ -1248,13 -1252,6 +1252,6 @@@ static const int kScavengeTimerDelayInS
// Number of free committed pages that we want to keep around.
static const size_t kMinimumFreeCommittedPageCount = 512;
- // During a scavenge, we'll release up to a fraction of the free committed pages.
- #if OS(WINDOWS)
- // We are slightly less aggressive in releasing memory on Windows due to performance reasons.
- static const int kMaxScavengeAmountFactor = 3;
- #else
- static const int kMaxScavengeAmountFactor = 2;
- #endif
#endif
class TCMalloc_PageHeap {
@@@ -1507,39 -1504,35 +1504,35 @@@ ALWAYS_INLINE void TCMalloc_PageHeap::s
#endif
- void TCMalloc_PageHeap::scavenge()
+ void TCMalloc_PageHeap::scavenge()
{
- // If we have to commit memory in the last 5 seconds, it means we don't have enough free committed pages
- // for the amount of allocations that we do. So hold off on releasing memory back to the system.
+ // If we've recently commited pages, our working set is growing, so now is
+ // not a good time to free pages.
if (pages_committed_since_last_scavenge_ > 0) {
pages_committed_since_last_scavenge_ = 0;
return;
}
- Length pagesDecommitted = 0;
- for (int i = kMaxPages; i >= 0; i--) {
+
+ for (int i = kMaxPages; i >= 0 && shouldContinueScavenging(); i--) {
SpanList* slist = (static_cast<size_t>(i) == kMaxPages) ? &large_ : &free_[i];
if (!DLL_IsEmpty(&slist->normal)) {
// Release the last span on the normal portion of this list
Span* s = slist->normal.prev;
- // Only decommit up to a fraction of the free committed pages if pages_allocated_since_last_scavenge_ > 0.
- if ((pagesDecommitted + s->length) * kMaxScavengeAmountFactor > free_committed_pages_)
- continue;
DLL_Remove(s);
- TCMalloc_SystemRelease(reinterpret_cast<void*>(s->start << kPageShift),
- static_cast<size_t>(s->length << kPageShift));
+ ASSERT(!s->decommitted);
if (!s->decommitted) {
- pagesDecommitted += s->length;
+ TCMalloc_SystemRelease(reinterpret_cast<void*>(s->start << kPageShift),
+ static_cast<size_t>(s->length << kPageShift));
+ ASSERT(free_committed_pages_ >= s->length);
+ free_committed_pages_ -= s->length;
s->decommitted = true;
}
DLL_Prepend(&slist->returned, s);
- // We can stop scavenging if the number of free committed pages left is less than or equal to the minimum number we want to keep around.
- if (free_committed_pages_ <= kMinimumFreeCommittedPageCount + pagesDecommitted)
- break;
}
}
+
+ ASSERT(!shouldContinueScavenging());
pages_committed_since_last_scavenge_ = 0;
- ASSERT(free_committed_pages_ >= pagesDecommitted);
- free_committed_pages_ -= pagesDecommitted;
}
ALWAYS_INLINE bool TCMalloc_PageHeap::shouldContinueScavenging() const
@@@ -2328,13 -2321,13 +2321,13 @@@ static TCMalloc_Central_FreeListPadded
// Page-level allocator
static SpinLock pageheap_lock = SPINLOCK_INITIALIZER;
-static void* pageheap_memory[(sizeof(TCMalloc_PageHeap) + sizeof(void*) - 1) / sizeof(void*)];
+static uint64_t pageheap_memory[(sizeof(TCMalloc_PageHeap) + sizeof(uint64_t) - 1) / sizeof(uint64_t)];
static bool phinited = false;
// Avoid extra level of indirection by making "pageheap" be just an alias
// of pageheap_memory.
typedef union {
- void* m_memory;
+ uint64_t* m_memory;
TCMalloc_PageHeap* m_pageHeap;
} PageHeapUnion;
diff --combined WebCore/platform/text/AtomicString.cpp
index be38ee5,19821c0..c3b662d
--- a/WebCore/platform/text/AtomicString.cpp
+++ b/WebCore/platform/text/AtomicString.cpp
@@@ -103,9 -103,9 +103,9 @@@ static inline bool equal(StringImpl* st
if (string->length() != length)
return false;
+#if CPU(ARM) || CPU(SPARC) || CPU(SH4)
// FIXME: perhaps we should have a more abstract macro that indicates when
// going 4 bytes at a time is unsafe
-#if CPU(ARM) || CPU(SH4)
const UChar* stringCharacters = string->characters();
for (unsigned i = 0; i != length; ++i) {
if (*stringCharacters++ != *characters++)
@@@ -248,7 -248,7 +248,7 @@@ PassRefPtr<StringImpl> AtomicString::ad
return 0;
UString::Rep* string = identifier.ustring().rep();
- unsigned length = string->size();
+ unsigned length = string->length();
if (!length)
return StringImpl::empty();
@@@ -265,7 -265,7 +265,7 @@@ PassRefPtr<StringImpl> AtomicString::ad
return 0;
UString::Rep* string = ustring.rep();
- unsigned length = string->size();
+ unsigned length = string->length();
if (!length)
return StringImpl::empty();
@@@ -282,7 -282,7 +282,7 @@@ AtomicStringImpl* AtomicString::find(co
return 0;
UString::Rep* string = identifier.ustring().rep();
- unsigned length = string->size();
+ unsigned length = string->length();
if (!length)
return static_cast<AtomicStringImpl*>(StringImpl::empty());
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list