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

Unified Diff: src/heap/spaces.h

Issue 1559873004: [heap] Buffer counter updates for new space evacuation. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Switch AdjustLiveBytes to checking whether we are in a HeapIterator Created 4 years, 11 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 | « src/heap/mark-compact.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/spaces.h
diff --git a/src/heap/spaces.h b/src/heap/spaces.h
index 19708dcb782315ab9ce2974137db96e86bf0601a..78386c44eb8fbb70a1e50de44cbc3924c2f7a573 100644
--- a/src/heap/spaces.h
+++ b/src/heap/spaces.h
@@ -595,6 +595,7 @@ class MemoryChunk {
}
live_byte_count_ = 0;
}
+
void IncrementLiveBytes(int by) {
if (FLAG_gc_verbose) {
printf("UpdateLiveBytes:%p:%x%c=%x->%x\n", static_cast<void*>(this),
@@ -602,10 +603,12 @@ class MemoryChunk {
live_byte_count_ + by);
}
live_byte_count_ += by;
+ DCHECK_GE(live_byte_count_, 0);
DCHECK_LE(static_cast<unsigned>(live_byte_count_), size_);
}
+
int LiveBytes() {
- DCHECK(static_cast<unsigned>(live_byte_count_) <= size_);
+ DCHECK_LE(static_cast<unsigned>(live_byte_count_), size_);
return live_byte_count_;
}
« no previous file with comments | « src/heap/mark-compact.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698