| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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_ |
| OLD | NEW |