OLD | NEW |
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 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
249 // The heap map contains the sizes and class ids for the objects in each page. | 249 // The heap map contains the sizes and class ids for the objects in each page. |
250 void PrintHeapMapToJSONStream(Isolate* isolate, JSONStream* stream) { | 250 void PrintHeapMapToJSONStream(Isolate* isolate, JSONStream* stream) { |
251 return old_space_.PrintHeapMapToJSONStream(isolate, stream); | 251 return old_space_.PrintHeapMapToJSONStream(isolate, stream); |
252 } | 252 } |
253 | 253 |
254 Isolate* isolate() const { return isolate_; } | 254 Isolate* isolate() const { return isolate_; } |
255 | 255 |
256 Monitor* barrier() const { return barrier_; } | 256 Monitor* barrier() const { return barrier_; } |
257 Monitor* barrier_done() const { return barrier_done_; } | 257 Monitor* barrier_done() const { return barrier_done_; } |
258 | 258 |
259 Monitor* finalization_tasks_lock() const { return finalization_tasks_lock_; } | |
260 intptr_t finalization_tasks() const { return finalization_tasks_; } | |
261 void set_finalization_tasks(intptr_t count) { finalization_tasks_ = count; } | |
262 | |
263 bool ShouldPretenure(intptr_t class_id) const; | 259 bool ShouldPretenure(intptr_t class_id) const; |
264 | 260 |
265 void SetupExternalPage(void* pointer, uword size, bool is_executable) { | 261 void SetupExternalPage(void* pointer, uword size, bool is_executable) { |
266 old_space_.SetupExternalPage(pointer, size, is_executable); | 262 old_space_.SetupExternalPage(pointer, size, is_executable); |
267 } | 263 } |
268 | 264 |
269 private: | 265 private: |
270 class GCStats : public ValueObject { | 266 class GCStats : public ValueObject { |
271 public: | 267 public: |
272 GCStats() {} | 268 GCStats() {} |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
350 // The different spaces used for allocation. | 346 // The different spaces used for allocation. |
351 ALIGN8 Scavenger new_space_; | 347 ALIGN8 Scavenger new_space_; |
352 PageSpace old_space_; | 348 PageSpace old_space_; |
353 | 349 |
354 WeakTable* new_weak_tables_[kNumWeakSelectors]; | 350 WeakTable* new_weak_tables_[kNumWeakSelectors]; |
355 WeakTable* old_weak_tables_[kNumWeakSelectors]; | 351 WeakTable* old_weak_tables_[kNumWeakSelectors]; |
356 | 352 |
357 Monitor* barrier_; | 353 Monitor* barrier_; |
358 Monitor* barrier_done_; | 354 Monitor* barrier_done_; |
359 | 355 |
360 Monitor* finalization_tasks_lock_; | |
361 intptr_t finalization_tasks_; | |
362 | |
363 // GC stats collection. | 356 // GC stats collection. |
364 GCStats stats_; | 357 GCStats stats_; |
365 | 358 |
366 // This heap is in read-only mode: No allocation is allowed. | 359 // This heap is in read-only mode: No allocation is allowed. |
367 bool read_only_; | 360 bool read_only_; |
368 | 361 |
369 // GC on the heap is in progress. | 362 // GC on the heap is in progress. |
370 Monitor gc_in_progress_monitor_; | 363 Monitor gc_in_progress_monitor_; |
371 bool gc_new_space_in_progress_; | 364 bool gc_new_space_in_progress_; |
372 bool gc_old_space_in_progress_; | 365 bool gc_old_space_in_progress_; |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
407 // Note: During this scope, the code pages are non-executable. | 400 // Note: During this scope, the code pages are non-executable. |
408 class WritableVMIsolateScope : StackResource { | 401 class WritableVMIsolateScope : StackResource { |
409 public: | 402 public: |
410 explicit WritableVMIsolateScope(Thread* thread); | 403 explicit WritableVMIsolateScope(Thread* thread); |
411 ~WritableVMIsolateScope(); | 404 ~WritableVMIsolateScope(); |
412 }; | 405 }; |
413 | 406 |
414 } // namespace dart | 407 } // namespace dart |
415 | 408 |
416 #endif // VM_HEAP_H_ | 409 #endif // VM_HEAP_H_ |
OLD | NEW |