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

Side by Side Diff: runtime/vm/pages.h

Issue 13927008: Align start of the page's object area to match OS::kMaxPreferredCodeAlignment. (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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #ifndef VM_PAGES_H_ 5 #ifndef VM_PAGES_H_
6 #define VM_PAGES_H_ 6 #define VM_PAGES_H_
7 7
8 #include <map> 8 #include <map>
9 9
10 #include "vm/freelist.h" 10 #include "vm/freelist.h"
(...skipping 18 matching lines...) Expand all
29 29
30 HeapPage* next() const { return next_; } 30 HeapPage* next() const { return next_; }
31 void set_next(HeapPage* next) { next_ = next; } 31 void set_next(HeapPage* next) { next_ = next; }
32 32
33 bool Contains(uword addr) { 33 bool Contains(uword addr) {
34 return memory_->Contains(addr); 34 return memory_->Contains(addr);
35 } 35 }
36 36
37 uword object_start() const { 37 uword object_start() const {
38 return (reinterpret_cast<uword>(this) + 38 return (reinterpret_cast<uword>(this) +
39 Utils::RoundUp(sizeof(HeapPage), kObjectAlignment)); 39 Utils::RoundUp(sizeof(HeapPage), OS::kMaxPreferredCodeAlignment));
40 } 40 }
41 uword object_end() const { 41 uword object_end() const {
42 return object_end_; 42 return object_end_;
43 } 43 }
44 44
45 void set_used(uword used) { used_ = used; } 45 void set_used(uword used) { used_ = used; }
46 uword used() const { return used_; } 46 uword used() const { return used_; }
47 void AddUsed(uword size) { 47 void AddUsed(uword size) {
48 used_ += size; 48 used_ += size;
49 } 49 }
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 PageSpaceController page_space_controller_; 278 PageSpaceController page_space_controller_;
279 279
280 friend class PageSpaceController; 280 friend class PageSpaceController;
281 281
282 DISALLOW_IMPLICIT_CONSTRUCTORS(PageSpace); 282 DISALLOW_IMPLICIT_CONSTRUCTORS(PageSpace);
283 }; 283 };
284 284
285 } // namespace dart 285 } // namespace dart
286 286
287 #endif // VM_PAGES_H_ 287 #endif // VM_PAGES_H_
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698