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

Unified Diff: Source/platform/heap/ThreadState.h

Issue 1252683003: Oilpan: Schedule a precise GC when a page navigates (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 4 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
« no previous file with comments | « Source/core/loader/FrameLoader.cpp ('k') | Source/platform/heap/ThreadState.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/heap/ThreadState.h
diff --git a/Source/platform/heap/ThreadState.h b/Source/platform/heap/ThreadState.h
index 0c015aeee37db03a46d4f7c03e250cddb3e39ba8..d693c92dfdcb0b59c2e661c4a587a2b0bccac9b3 100644
--- a/Source/platform/heap/ThreadState.h
+++ b/Source/platform/heap/ThreadState.h
@@ -185,6 +185,7 @@ public:
IdleGCScheduled,
PreciseGCScheduled,
FullGCScheduled,
+ PageNavigationGCScheduled,
GCRunning,
EagerSweepScheduled,
LazySweepScheduled,
@@ -329,6 +330,8 @@ public:
void scheduleIdleGC();
void scheduleIdleLazySweep();
void schedulePreciseGC();
+ void schedulePageNavigationGCIfNeeded(float estimatedRemovalRatio);
+ void schedulePageNavigationGC();
void scheduleGCIfNeeded();
void setGCState(GCState);
GCState gcState() const;
@@ -678,6 +681,9 @@ private:
bool shouldScheduleIdleGC();
bool shouldSchedulePreciseGC();
bool shouldForceConservativeGC();
+ // estimatedRemovalRatio is the estimated ratio of objects that will be no
+ // longer necessary due to the navigation.
+ bool shouldSchedulePageNavigationGC(float estimatedRemovalRatio);
// Internal helper for GC policy handling code. Returns true if
// an urgent conservative GC is now needed due to memory pressure.
« no previous file with comments | « Source/core/loader/FrameLoader.cpp ('k') | Source/platform/heap/ThreadState.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698