| 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 "vm/freelist.h" | 8 #include "vm/freelist.h" |
| 9 #include "vm/globals.h" | 9 #include "vm/globals.h" |
| 10 #include "vm/virtual_memory.h" | 10 #include "vm/virtual_memory.h" |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 214 void StartEndAddress(uword* start, uword* end) const; | 214 void StartEndAddress(uword* start, uword* end) const; |
| 215 | 215 |
| 216 void SetGrowthControlState(bool state) { | 216 void SetGrowthControlState(bool state) { |
| 217 page_space_controller_.set_is_enabled(state); | 217 page_space_controller_.set_is_enabled(state); |
| 218 } | 218 } |
| 219 | 219 |
| 220 bool GrowthControlState() { | 220 bool GrowthControlState() { |
| 221 return page_space_controller_.is_enabled(); | 221 return page_space_controller_.is_enabled(); |
| 222 } | 222 } |
| 223 | 223 |
| 224 bool NeedExternalGC() { |
| 225 return used_in_words_ + ExternalInWords() > max_capacity_in_words_; |
| 226 } |
| 227 |
| 224 void WriteProtect(bool read_only); | 228 void WriteProtect(bool read_only); |
| 225 | 229 |
| 226 void AddGCTime(int64_t micros) { | 230 void AddGCTime(int64_t micros) { |
| 227 gc_time_micros_ += micros; | 231 gc_time_micros_ += micros; |
| 228 } | 232 } |
| 229 | 233 |
| 230 int64_t gc_time_micros() const { | 234 int64_t gc_time_micros() const { |
| 231 return gc_time_micros_; | 235 return gc_time_micros_; |
| 232 } | 236 } |
| 233 | 237 |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 298 intptr_t collections_; | 302 intptr_t collections_; |
| 299 | 303 |
| 300 friend class PageSpaceController; | 304 friend class PageSpaceController; |
| 301 | 305 |
| 302 DISALLOW_IMPLICIT_CONSTRUCTORS(PageSpace); | 306 DISALLOW_IMPLICIT_CONSTRUCTORS(PageSpace); |
| 303 }; | 307 }; |
| 304 | 308 |
| 305 } // namespace dart | 309 } // namespace dart |
| 306 | 310 |
| 307 #endif // VM_PAGES_H_ | 311 #endif // VM_PAGES_H_ |
| OLD | NEW |