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

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

Issue 266643002: Object graph visitor: general depth-first search. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 7 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 | « no previous file | runtime/vm/object_graph.h » ('j') | runtime/vm/object_graph.cc » ('J')
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_HEAP_H_ 5 #ifndef VM_HEAP_H_
6 #define VM_HEAP_H_ 6 #define VM_HEAP_H_
7 7
8 #include "platform/assert.h" 8 #include "platform/assert.h"
9 #include "vm/allocation.h" 9 #include "vm/allocation.h"
10 #include "vm/flags.h" 10 #include "vm/flags.h"
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 149
150 // Enables growth control on the page space heaps. This should be 150 // Enables growth control on the page space heaps. This should be
151 // called before any user code is executed. 151 // called before any user code is executed.
152 void EnableGrowthControl() { SetGrowthControlState(true); } 152 void EnableGrowthControl() { SetGrowthControlState(true); }
153 void DisableGrowthControl() { SetGrowthControlState(false); } 153 void DisableGrowthControl() { SetGrowthControlState(false); }
154 void SetGrowthControlState(bool state); 154 void SetGrowthControlState(bool state);
155 bool GrowthControlState(); 155 bool GrowthControlState();
156 156
157 // Protect access to the heap. 157 // Protect access to the heap.
158 void WriteProtect(bool read_only); 158 void WriteProtect(bool read_only);
159 void WriteProtectCode(bool read_only) {
160 old_space_->WriteProtectCode(read_only);
161 }
159 162
160 // Accessors for inlined allocation in generated code. 163 // Accessors for inlined allocation in generated code.
161 uword TopAddress(); 164 uword TopAddress();
162 uword EndAddress(); 165 uword EndAddress();
163 static intptr_t new_space_offset() { return OFFSET_OF(Heap, new_space_); } 166 static intptr_t new_space_offset() { return OFFSET_OF(Heap, new_space_); }
164 167
165 // Initialize the heap and register it with the isolate. 168 // Initialize the heap and register it with the isolate.
166 static void Init(Isolate* isolate, 169 static void Init(Isolate* isolate,
167 intptr_t max_new_gen_words, 170 intptr_t max_new_gen_words,
168 intptr_t max_old_gen_words); 171 intptr_t max_old_gen_words);
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 NoHeapGrowthControlScope(); 351 NoHeapGrowthControlScope();
349 ~NoHeapGrowthControlScope(); 352 ~NoHeapGrowthControlScope();
350 private: 353 private:
351 bool current_growth_controller_state_; 354 bool current_growth_controller_state_;
352 DISALLOW_COPY_AND_ASSIGN(NoHeapGrowthControlScope); 355 DISALLOW_COPY_AND_ASSIGN(NoHeapGrowthControlScope);
353 }; 356 };
354 357
355 } // namespace dart 358 } // namespace dart
356 359
357 #endif // VM_HEAP_H_ 360 #endif // VM_HEAP_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/object_graph.h » ('j') | runtime/vm/object_graph.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698