| 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" |
| 11 #include "vm/globals.h" | 11 #include "vm/globals.h" |
| 12 #include "vm/pages.h" | 12 #include "vm/pages.h" |
| 13 #include "vm/scavenger.h" | 13 #include "vm/scavenger.h" |
| 14 #include "vm/spaces.h" | 14 #include "vm/spaces.h" |
| 15 #include "vm/verifier.h" | 15 #include "vm/verifier.h" |
| 16 #include "vm/weak_table.h" | 16 #include "vm/weak_table.h" |
| 17 | 17 |
| 18 namespace dart { | 18 namespace dart { |
| 19 | 19 |
| 20 // Forward declarations. | 20 // Forward declarations. |
| 21 class Isolate; | 21 class Isolate; |
| 22 class ObjectPointerVisitor; | 22 class ObjectPointerVisitor; |
| 23 class ObjectSet; | 23 class ObjectSet; |
| 24 class ServiceEvent; | 24 class ServiceEvent; |
| 25 class VirtualMemory; | 25 class VirtualMemory; |
| 26 | 26 |
| 27 DECLARE_FLAG(bool, verify_before_gc); | |
| 28 DECLARE_FLAG(bool, verify_after_gc); | |
| 29 DECLARE_FLAG(bool, gc_at_alloc); | |
| 30 | |
| 31 class Heap { | 27 class Heap { |
| 32 public: | 28 public: |
| 33 enum Space { | 29 enum Space { |
| 34 kNew, | 30 kNew, |
| 35 kOld, | 31 kOld, |
| 36 kCode, | 32 kCode, |
| 37 // TODO(koda): Harmonize all old-space allocation and get rid of this. | 33 // TODO(koda): Harmonize all old-space allocation and get rid of this. |
| 38 kPretenured, | 34 kPretenured, |
| 39 }; | 35 }; |
| 40 | 36 |
| (...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 388 explicit WritableVMIsolateScope(Thread* thread, bool include_code_pages); | 384 explicit WritableVMIsolateScope(Thread* thread, bool include_code_pages); |
| 389 ~WritableVMIsolateScope(); | 385 ~WritableVMIsolateScope(); |
| 390 | 386 |
| 391 private: | 387 private: |
| 392 bool include_code_pages_; | 388 bool include_code_pages_; |
| 393 }; | 389 }; |
| 394 | 390 |
| 395 } // namespace dart | 391 } // namespace dart |
| 396 | 392 |
| 397 #endif // VM_HEAP_H_ | 393 #endif // VM_HEAP_H_ |
| OLD | NEW |