Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1077)

Unified Diff: third_party/WebKit/Source/platform/heap/Heap.cpp

Issue 1695653004: Oilpan: Reduce the reserved size of CallbackStacks Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/platform/heap/Heap.cpp
diff --git a/third_party/WebKit/Source/platform/heap/Heap.cpp b/third_party/WebKit/Source/platform/heap/Heap.cpp
index 8a414e3ec0378d68a144275f1cf59b6561e47c60..9296517eb4a1431929802989b4ce27d19d487a20 100644
--- a/third_party/WebKit/Source/platform/heap/Heap.cpp
+++ b/third_party/WebKit/Source/platform/heap/Heap.cpp
@@ -158,10 +158,10 @@ void Heap::flushHeapDoesNotContainCache()
void Heap::init()
{
ThreadState::init();
- s_markingStack = new CallbackStack();
- s_postMarkingCallbackStack = new CallbackStack();
- s_globalWeakCallbackStack = new CallbackStack();
- s_ephemeronStack = new CallbackStack();
+ s_markingStack = new CallbackStack(4096);
sof 2016/02/14 21:47:03 These are fairly arbitrary numbers, are they based
+ s_postMarkingCallbackStack = new CallbackStack(128);
+ s_globalWeakCallbackStack = new CallbackStack(2048);
+ s_ephemeronStack = new CallbackStack(128);
s_heapDoesNotContainCache = new HeapDoesNotContainCache();
s_freePagePool = new FreePagePool();
s_orphanedPagePool = new OrphanedPagePool();
@@ -367,6 +367,11 @@ void Heap::postGC(BlinkGC::GCType gcType)
ASSERT(ThreadState::current()->isInGC());
for (ThreadState* state : ThreadState::attachedThreads())
state->postGC(gcType);
+
+ ASSERT(s_markingStack->isEmpty());
+ ASSERT(s_postMarkingCallbackStack->isEmpty());
+ ASSERT(s_globalWeakCallbackStack->isEmpty());
+ ASSERT(s_ephemeronStack->isEmpty());
}
const char* Heap::gcReasonString(BlinkGC::GCReason reason)
« no previous file with comments | « third_party/WebKit/Source/platform/heap/CallbackStack.cpp ('k') | third_party/WebKit/Source/platform/heap/ThreadState.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698