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

Unified Diff: runtime/vm/scavenger.cc

Issue 70993002: - Convert heap sizes to words from bytes. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 1 month 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
« runtime/vm/pages.cc ('K') | « 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
===================================================================
--- runtime/vm/scavenger.cc (revision 30304)
+++ runtime/vm/scavenger.cc (working copy)
@@ -303,7 +303,9 @@
};
-Scavenger::Scavenger(Heap* heap, intptr_t max_capacity, uword object_alignment)
+Scavenger::Scavenger(Heap* heap,
+ intptr_t max_capacity_in_words,
+ uword object_alignment)
: heap_(heap),
object_alignment_(object_alignment),
scavenging_(false) {
@@ -312,7 +314,7 @@
ASSERT(Object::tags_offset() == 0);
// Allocate the virtual memory for this scavenge heap.
- space_ = VirtualMemory::Reserve(max_capacity);
+ space_ = VirtualMemory::Reserve(max_capacity_in_words << kWordSizeLog2);
if (space_ == NULL) {
FATAL("Out of memory.\n");
}
@@ -439,7 +441,7 @@
IterateStoreBuffers(isolate, visitor);
IterateObjectIdTable(isolate, visitor);
int64_t end = OS::GetCurrentTimeMicros();
- heap_->RecordData(kToKBAfterStoreBuffer, (in_use() + (KB >> 1)) >> KBLog2);
+ heap_->RecordData(kToKBAfterStoreBuffer, RoundWordsToKB(UsedInWords()));
heap_->RecordTime(kVisitIsolateRoots, middle - start);
heap_->RecordTime(kIterateStoreBuffers, end - middle);
}
« runtime/vm/pages.cc ('K') | « runtime/vm/scavenger.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698