| 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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 RawObject* FindNewObject(FindObjectVisitor* visitor) const; | 117 RawObject* FindNewObject(FindObjectVisitor* visitor) const; |
| 118 RawObject* FindObject(FindObjectVisitor* visitor) const; | 118 RawObject* FindObject(FindObjectVisitor* visitor) const; |
| 119 | 119 |
| 120 void CollectGarbage(Space space); | 120 void CollectGarbage(Space space); |
| 121 void CollectGarbage(Space space, ApiCallbacks api_callbacks, GCReason reason); | 121 void CollectGarbage(Space space, ApiCallbacks api_callbacks, GCReason reason); |
| 122 void CollectAllGarbage(); | 122 void CollectAllGarbage(); |
| 123 bool NeedsGarbageCollection() const { | 123 bool NeedsGarbageCollection() const { |
| 124 return old_space_.NeedsGarbageCollection(); | 124 return old_space_.NeedsGarbageCollection(); |
| 125 } | 125 } |
| 126 | 126 |
| 127 #if defined(DEBUG) |
| 128 void WaitForSweeperTasks(); |
| 129 #endif |
| 130 |
| 127 // Enables growth control on the page space heaps. This should be | 131 // Enables growth control on the page space heaps. This should be |
| 128 // called before any user code is executed. | 132 // called before any user code is executed. |
| 129 void InitGrowthControl(); | 133 void InitGrowthControl(); |
| 130 void EnableGrowthControl() { SetGrowthControlState(true); } | 134 void EnableGrowthControl() { SetGrowthControlState(true); } |
| 131 void DisableGrowthControl() { SetGrowthControlState(false); } | 135 void DisableGrowthControl() { SetGrowthControlState(false); } |
| 132 void SetGrowthControlState(bool state); | 136 void SetGrowthControlState(bool state); |
| 133 bool GrowthControlState(); | 137 bool GrowthControlState(); |
| 134 | 138 |
| 135 // Protect access to the heap. Note: Code pages are made | 139 // Protect access to the heap. Note: Code pages are made |
| 136 // executable/non-executable when 'read_only' is true/false, respectively. | 140 // executable/non-executable when 'read_only' is true/false, respectively. |
| (...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 390 explicit WritableVMIsolateScope(Thread* thread, bool include_code_pages); | 394 explicit WritableVMIsolateScope(Thread* thread, bool include_code_pages); |
| 391 ~WritableVMIsolateScope(); | 395 ~WritableVMIsolateScope(); |
| 392 | 396 |
| 393 private: | 397 private: |
| 394 bool include_code_pages_; | 398 bool include_code_pages_; |
| 395 }; | 399 }; |
| 396 | 400 |
| 397 } // namespace dart | 401 } // namespace dart |
| 398 | 402 |
| 399 #endif // VM_HEAP_H_ | 403 #endif // VM_HEAP_H_ |
| OLD | NEW |