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 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
333 void EndNewSpaceGC(); | 333 void EndNewSpaceGC(); |
334 bool BeginOldSpaceGC(Thread* thread); | 334 bool BeginOldSpaceGC(Thread* thread); |
335 void EndOldSpaceGC(); | 335 void EndOldSpaceGC(); |
336 | 336 |
337 // If this heap is non-empty, updates start and end to the smallest range that | 337 // If this heap is non-empty, updates start and end to the smallest range that |
338 // contains both the original [start, end) and the [lowest, highest) addresses | 338 // contains both the original [start, end) and the [lowest, highest) addresses |
339 // of this heap. | 339 // of this heap. |
340 void GetMergedAddressRange(uword* start, uword* end) const; | 340 void GetMergedAddressRange(uword* start, uword* end) const; |
341 | 341 |
342 Isolate* isolate_; | 342 Isolate* isolate_; |
343 Monitor* barrier_; | |
344 Monitor* barrier_done_; | |
345 | 343 |
346 // The different spaces used for allocation. | 344 // The different spaces used for allocation. |
347 Scavenger new_space_; | 345 ALIGN8 Scavenger new_space_; |
348 PageSpace old_space_; | 346 PageSpace old_space_; |
349 | 347 |
350 WeakTable* new_weak_tables_[kNumWeakSelectors]; | 348 WeakTable* new_weak_tables_[kNumWeakSelectors]; |
351 WeakTable* old_weak_tables_[kNumWeakSelectors]; | 349 WeakTable* old_weak_tables_[kNumWeakSelectors]; |
352 | 350 |
| 351 Monitor* barrier_; |
| 352 Monitor* barrier_done_; |
| 353 |
353 // GC stats collection. | 354 // GC stats collection. |
354 GCStats stats_; | 355 GCStats stats_; |
355 | 356 |
356 // This heap is in read-only mode: No allocation is allowed. | 357 // This heap is in read-only mode: No allocation is allowed. |
357 bool read_only_; | 358 bool read_only_; |
358 | 359 |
359 // GC on the heap is in progress. | 360 // GC on the heap is in progress. |
360 Monitor gc_in_progress_monitor_; | 361 Monitor gc_in_progress_monitor_; |
361 bool gc_new_space_in_progress_; | 362 bool gc_new_space_in_progress_; |
362 bool gc_old_space_in_progress_; | 363 bool gc_old_space_in_progress_; |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
394 // Note: During this scope, the code pages are non-executable. | 395 // Note: During this scope, the code pages are non-executable. |
395 class WritableVMIsolateScope : StackResource { | 396 class WritableVMIsolateScope : StackResource { |
396 public: | 397 public: |
397 explicit WritableVMIsolateScope(Thread* thread); | 398 explicit WritableVMIsolateScope(Thread* thread); |
398 ~WritableVMIsolateScope(); | 399 ~WritableVMIsolateScope(); |
399 }; | 400 }; |
400 | 401 |
401 } // namespace dart | 402 } // namespace dart |
402 | 403 |
403 #endif // VM_HEAP_H_ | 404 #endif // VM_HEAP_H_ |
OLD | NEW |