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/ring_buffer.h" | 10 #include "vm/ring_buffer.h" |
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
243 } | 243 } |
244 | 244 |
245 bool GrowthControlState() { | 245 bool GrowthControlState() { |
246 return page_space_controller_.is_enabled(); | 246 return page_space_controller_.is_enabled(); |
247 } | 247 } |
248 | 248 |
249 bool NeedsExternalGC() const { | 249 bool NeedsExternalGC() const { |
250 return UsedInWords() + ExternalInWords() > max_capacity_in_words_; | 250 return UsedInWords() + ExternalInWords() > max_capacity_in_words_; |
251 } | 251 } |
252 | 252 |
| 253 // TODO(koda): Unify protection handling. |
253 void WriteProtect(bool read_only); | 254 void WriteProtect(bool read_only); |
| 255 void WriteProtectCode(bool read_only); |
254 | 256 |
255 void AddGCTime(int64_t micros) { | 257 void AddGCTime(int64_t micros) { |
256 gc_time_micros_ += micros; | 258 gc_time_micros_ += micros; |
257 } | 259 } |
258 | 260 |
259 int64_t gc_time_micros() const { | 261 int64_t gc_time_micros() const { |
260 return gc_time_micros_; | 262 return gc_time_micros_; |
261 } | 263 } |
262 | 264 |
263 void IncrementCollections() { | 265 void IncrementCollections() { |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
329 intptr_t collections_; | 331 intptr_t collections_; |
330 | 332 |
331 friend class PageSpaceController; | 333 friend class PageSpaceController; |
332 | 334 |
333 DISALLOW_IMPLICIT_CONSTRUCTORS(PageSpace); | 335 DISALLOW_IMPLICIT_CONSTRUCTORS(PageSpace); |
334 }; | 336 }; |
335 | 337 |
336 } // namespace dart | 338 } // namespace dart |
337 | 339 |
338 #endif // VM_PAGES_H_ | 340 #endif // VM_PAGES_H_ |
OLD | NEW |