| 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 RUNTIME_VM_HEAP_H_ | 5 #ifndef RUNTIME_VM_HEAP_H_ |
| 6 #define RUNTIME_VM_HEAP_H_ | 6 #define RUNTIME_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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 RawObject* FindNewObject(FindObjectVisitor* visitor) const; | 107 RawObject* FindNewObject(FindObjectVisitor* visitor) const; |
| 108 RawObject* FindObject(FindObjectVisitor* visitor) const; | 108 RawObject* FindObject(FindObjectVisitor* visitor) const; |
| 109 | 109 |
| 110 void CollectGarbage(Space space); | 110 void CollectGarbage(Space space); |
| 111 void CollectGarbage(Space space, ApiCallbacks api_callbacks, GCReason reason); | 111 void CollectGarbage(Space space, ApiCallbacks api_callbacks, GCReason reason); |
| 112 void CollectAllGarbage(); | 112 void CollectAllGarbage(); |
| 113 bool NeedsGarbageCollection() const { | 113 bool NeedsGarbageCollection() const { |
| 114 return old_space_.NeedsGarbageCollection(); | 114 return old_space_.NeedsGarbageCollection(); |
| 115 } | 115 } |
| 116 | 116 |
| 117 #if defined(DEBUG) | 117 void WaitForSweeperTasks(Thread* thread); |
| 118 void WaitForSweeperTasks(); | |
| 119 #endif | |
| 120 | 118 |
| 121 // Enables growth control on the page space heaps. This should be | 119 // Enables growth control on the page space heaps. This should be |
| 122 // called before any user code is executed. | 120 // called before any user code is executed. |
| 123 void InitGrowthControl(); | 121 void InitGrowthControl(); |
| 124 void EnableGrowthControl() { SetGrowthControlState(true); } | 122 void EnableGrowthControl() { SetGrowthControlState(true); } |
| 125 void DisableGrowthControl() { SetGrowthControlState(false); } | 123 void DisableGrowthControl() { SetGrowthControlState(false); } |
| 126 void SetGrowthControlState(bool state); | 124 void SetGrowthControlState(bool state); |
| 127 bool GrowthControlState(); | 125 bool GrowthControlState(); |
| 128 | 126 |
| 129 // Protect access to the heap. Note: Code pages are made | 127 // Protect access to the heap. Note: Code pages are made |
| (...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 388 // Note: During this scope, the code pages are non-executable. | 386 // Note: During this scope, the code pages are non-executable. |
| 389 class WritableVMIsolateScope : StackResource { | 387 class WritableVMIsolateScope : StackResource { |
| 390 public: | 388 public: |
| 391 explicit WritableVMIsolateScope(Thread* thread); | 389 explicit WritableVMIsolateScope(Thread* thread); |
| 392 ~WritableVMIsolateScope(); | 390 ~WritableVMIsolateScope(); |
| 393 }; | 391 }; |
| 394 | 392 |
| 395 } // namespace dart | 393 } // namespace dart |
| 396 | 394 |
| 397 #endif // RUNTIME_VM_HEAP_H_ | 395 #endif // RUNTIME_VM_HEAP_H_ |
| OLD | NEW |