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

Unified Diff: src/heap.cc

Issue 5966001: Heap::gc_count_, last_gc_count, and kGCsBetweenCleanup should be unsigned... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 10 years 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 | « src/heap.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap.cc
===================================================================
--- src/heap.cc (revision 6057)
+++ src/heap.cc (working copy)
@@ -133,7 +133,7 @@
int Heap::mc_count_ = 0;
int Heap::ms_count_ = 0;
-int Heap::gc_count_ = 0;
+unsigned int Heap::gc_count_ = 0;
GCTracer* Heap::tracer_ = NULL;
@@ -3758,9 +3758,9 @@
static const int kIdlesBeforeMarkSweep = 7;
static const int kIdlesBeforeMarkCompact = 8;
static const int kMaxIdleCount = kIdlesBeforeMarkCompact + 1;
- static const int kGCsBetweenCleanup = 4;
+ static const unsigned int kGCsBetweenCleanup = 4;
static int number_idle_notifications = 0;
- static int last_gc_count = gc_count_;
+ static unsigned int last_gc_count = gc_count_;
Vyacheslav Egorov (Chromium) 2011/02/21 15:35:14 There is a bug here: last_gc_count will be initial
bool uncommit = true;
bool finished = false;
@@ -3769,7 +3769,7 @@
// GCs have taken place. This allows another round of cleanup based
// on idle notifications if enough work has been carried out to
// provoke a number of garbage collections.
- if (gc_count_ < last_gc_count + kGCsBetweenCleanup) {
+ if (gc_count_ - last_gc_count < kGCsBetweenCleanup) {
number_idle_notifications =
Min(number_idle_notifications + 1, kMaxIdleCount);
} else {
« no previous file with comments | « src/heap.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698