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

Unified Diff: runtime/vm/scavenger.cc

Issue 2992153002: Fixes bug in calculation of memory used by new space (Closed)
Patch Set: Created 3 years, 5 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 | « runtime/vm/scavenger.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/scavenger.cc
diff --git a/runtime/vm/scavenger.cc b/runtime/vm/scavenger.cc
index 336f9c9cc156b2ab953259ed43561f9e988f8419..0a17e7343cf51132d4ab91a596e5ad1082e745e1 100644
--- a/runtime/vm/scavenger.cc
+++ b/runtime/vm/scavenger.cc
@@ -948,4 +948,11 @@ void Scavenger::Evacuate() {
ASSERT((UsedInWords() == 0) || failed_to_promote_);
}
+int64_t Scavenger::UsedInWords() const {
+ uword saved_top = FlushTLS();
+ int64_t used_in_words = (top_ - FirstObjectStart()) >> kWordSizeLog2;
+ UnflushTLS(saved_top);
+ return used_in_words;
+}
+
} // namespace dart
« no previous file with comments | « runtime/vm/scavenger.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698