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

Unified Diff: runtime/vm/scavenger.h

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
Index: runtime/vm/scavenger.h
===================================================================
--- runtime/vm/scavenger.h (revision 30304)
+++ runtime/vm/scavenger.h (working copy)
@@ -24,7 +24,7 @@
class Scavenger {
public:
- Scavenger(Heap* heap, intptr_t max_capacity, uword object_alignment);
+ Scavenger(Heap* heap, intptr_t max_capacity_in_words, uword object_alignment);
~Scavenger();
// Check whether this Scavenger contains this address.
@@ -69,8 +69,10 @@
static intptr_t top_offset() { return OFFSET_OF(Scavenger, top_); }
static intptr_t end_offset() { return OFFSET_OF(Scavenger, end_); }
- intptr_t in_use() const { return (top_ - FirstObjectStart()); }
- intptr_t capacity() const { return space_->size(); }
+ intptr_t UsedInWords() const {
+ return (top_ - FirstObjectStart()) >> kWordSizeLog2;
+ }
+ intptr_t CapacityInWords() const { return space_->size() >> kWordSizeLog2; }
void VisitObjects(ObjectVisitor* visitor) const;
void VisitObjectPointers(ObjectPointerVisitor* visitor) const;
« runtime/vm/pages.cc ('K') | « runtime/vm/pages_test.cc ('k') | runtime/vm/scavenger.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698