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

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

Issue 1374373004: Clarify heap write protection interface and use WritableVMIsolateScope to resolve issue 23217. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 2 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
« no previous file with comments | « runtime/vm/object.cc ('k') | runtime/vm/pages.cc » ('j') | 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 "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
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
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_
OLDNEW
« no previous file with comments | « runtime/vm/object.cc ('k') | runtime/vm/pages.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698