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

Unified Diff: runtime/vm/pages.h

Issue 14158003: Fix bug introduced by r21269. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 8 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 | « no previous file | runtime/vm/pages.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/pages.h
diff --git a/runtime/vm/pages.h b/runtime/vm/pages.h
index 0d4bb02ed29facf87895e4b8e2dff57ea1ed47f8..f89b083db8cf14a58deb24fd7203710fca55f6bb 100644
--- a/runtime/vm/pages.h
+++ b/runtime/vm/pages.h
@@ -35,8 +35,7 @@ class HeapPage {
}
uword object_start() const {
- return (reinterpret_cast<uword>(this) +
- Utils::RoundUp(sizeof(HeapPage), OS::kMaxPreferredCodeAlignment));
+ return (reinterpret_cast<uword>(this) + ObjectStartOffset());
}
uword object_end() const {
return object_end_;
@@ -59,6 +58,10 @@ class HeapPage {
void WriteProtect(bool read_only);
+ static intptr_t ObjectStartOffset() {
+ return Utils::RoundUp(sizeof(HeapPage), OS::kMaxPreferredCodeAlignment);
+ }
+
private:
void set_object_end(uword val) {
ASSERT((val & kObjectAlignmentMask) == kOldObjectAlignmentOffset);
« no previous file with comments | « no previous file | runtime/vm/pages.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698