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

Unified Diff: src/spaces.h

Issue 7621014: Fix the thresholds so that the heap does not grow uncontrollably. This fixes (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/gc/
Patch Set: '' Created 9 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
Index: src/spaces.h
===================================================================
--- src/spaces.h (revision 8902)
+++ src/spaces.h (working copy)
@@ -1434,6 +1434,7 @@
void SetPagesToSweep(Page* first, Page* last) {
first_unswept_page_ = first;
last_unswept_page_ = last;
+ int unswept_pages = 0;
Page* p = first;
do {
@@ -1441,7 +1442,12 @@
// page. We have to set this flag on the pages to indicate this.
p->SetFlag(MemoryChunk::WAS_SWEPT_CONSERVATIVELY);
p = p->next_page();
+ unswept_pages++;
} while (p != last);
+
+ if (FLAG_trace_gc_verbose) {
+ PrintF("Postponing sweep for %d pages\n", unswept_pages);
+ }
}
bool AdvanceSweeper(intptr_t bytes_to_sweep);

Powered by Google App Engine
This is Rietveld 408576698