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

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

Issue 10830045: - Add the ability to protect VirtualMemory. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « runtime/vm/pages.cc ('k') | runtime/vm/scavenger.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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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_SCAVENGER_H_ 5 #ifndef VM_SCAVENGER_H_
6 #define VM_SCAVENGER_H_ 6 #define VM_SCAVENGER_H_
7 7
8 #include "platform/assert.h" 8 #include "platform/assert.h"
9 #include "platform/utils.h" 9 #include "platform/utils.h"
10 #include "vm/flags.h" 10 #include "vm/flags.h"
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 void StartEndAddress(uword* start, uword* end) const { 78 void StartEndAddress(uword* start, uword* end) const {
79 *start = to_->start(); 79 *start = to_->start();
80 *end = to_->end(); 80 *end = to_->end();
81 } 81 }
82 82
83 // Returns true if the last scavenge had a promotion failure. 83 // Returns true if the last scavenge had a promotion failure.
84 bool HadPromotionFailure() { 84 bool HadPromotionFailure() {
85 return had_promotion_failure_; 85 return had_promotion_failure_;
86 } 86 }
87 87
88 void WriteProtect(bool read_only);
89
88 private: 90 private:
89 uword FirstObjectStart() const { return to_->start() | object_alignment_; } 91 uword FirstObjectStart() const { return to_->start() | object_alignment_; }
90 void Prologue(Isolate* isolate, bool invoke_api_callbacks); 92 void Prologue(Isolate* isolate, bool invoke_api_callbacks);
91 void IterateStoreBuffers(Isolate* isolate, ScavengerVisitor* visitor); 93 void IterateStoreBuffers(Isolate* isolate, ScavengerVisitor* visitor);
92 void IterateRoots(Isolate* isolate, 94 void IterateRoots(Isolate* isolate,
93 ScavengerVisitor* visitor, 95 ScavengerVisitor* visitor,
94 bool visit_prologue_weak_persistent_handles); 96 bool visit_prologue_weak_persistent_handles);
95 void IterateWeakReferences(Isolate* isolate, ScavengerVisitor* visitor); 97 void IterateWeakReferences(Isolate* isolate, ScavengerVisitor* visitor);
96 void IterateWeakRoots(Isolate* isolate, 98 void IterateWeakRoots(Isolate* isolate,
97 HandleVisitor* visitor, 99 HandleVisitor* visitor,
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 152
151 friend class ScavengerVisitor; 153 friend class ScavengerVisitor;
152 friend class ScavengerWeakVisitor; 154 friend class ScavengerWeakVisitor;
153 155
154 DISALLOW_COPY_AND_ASSIGN(Scavenger); 156 DISALLOW_COPY_AND_ASSIGN(Scavenger);
155 }; 157 };
156 158
157 } // namespace dart 159 } // namespace dart
158 160
159 #endif // VM_SCAVENGER_H_ 161 #endif // VM_SCAVENGER_H_
OLDNEW
« no previous file with comments | « runtime/vm/pages.cc ('k') | runtime/vm/scavenger.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698