| 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/lockers.h" | 10 #include "vm/lockers.h" |
| (...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 270 | 270 |
| 271 bool GrowthControlState() { | 271 bool GrowthControlState() { |
| 272 return page_space_controller_.is_enabled(); | 272 return page_space_controller_.is_enabled(); |
| 273 } | 273 } |
| 274 | 274 |
| 275 bool NeedsExternalGC() const { | 275 bool NeedsExternalGC() const { |
| 276 return (max_external_in_words_ != 0) && | 276 return (max_external_in_words_ != 0) && |
| 277 (ExternalInWords() > max_external_in_words_); | 277 (ExternalInWords() > max_external_in_words_); |
| 278 } | 278 } |
| 279 | 279 |
| 280 // TODO(koda): Unify protection handling. | 280 // Note: Code pages are made executable/non-executable when 'read_only' is |
| 281 // true/false, respectively. |
| 281 void WriteProtect(bool read_only); | 282 void WriteProtect(bool read_only); |
| 282 void WriteProtectCode(bool read_only); | 283 void WriteProtectCode(bool read_only); |
| 283 | 284 |
| 284 void AddGCTime(int64_t micros) { | 285 void AddGCTime(int64_t micros) { |
| 285 gc_time_micros_ += micros; | 286 gc_time_micros_ += micros; |
| 286 } | 287 } |
| 287 | 288 |
| 288 int64_t gc_time_micros() const { | 289 int64_t gc_time_micros() const { |
| 289 return gc_time_micros_; | 290 return gc_time_micros_; |
| 290 } | 291 } |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 442 friend class HeapIterationScope; | 443 friend class HeapIterationScope; |
| 443 friend class PageSpaceController; | 444 friend class PageSpaceController; |
| 444 friend class SweeperTask; | 445 friend class SweeperTask; |
| 445 | 446 |
| 446 DISALLOW_IMPLICIT_CONSTRUCTORS(PageSpace); | 447 DISALLOW_IMPLICIT_CONSTRUCTORS(PageSpace); |
| 447 }; | 448 }; |
| 448 | 449 |
| 449 } // namespace dart | 450 } // namespace dart |
| 450 | 451 |
| 451 #endif // VM_PAGES_H_ | 452 #endif // VM_PAGES_H_ |
| OLD | NEW |