| 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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 // Find an object by visiting all pointers in the specified heap space, | 93 // Find an object by visiting all pointers in the specified heap space, |
| 94 // the 'visitor' is used to determine if an object is found or not. | 94 // the 'visitor' is used to determine if an object is found or not. |
| 95 // The 'visitor' function should be set up to return true if the | 95 // The 'visitor' function should be set up to return true if the |
| 96 // object is found, traversal through the heap space stops at that | 96 // object is found, traversal through the heap space stops at that |
| 97 // point. | 97 // point. |
| 98 // The 'visitor' function should return false if the object is not found, | 98 // The 'visitor' function should return false if the object is not found, |
| 99 // traversal through the heap space continues. | 99 // traversal through the heap space continues. |
| 100 RawInstructions* FindObjectInCodeSpace(FindObjectVisitor* visitor); | 100 RawInstructions* FindObjectInCodeSpace(FindObjectVisitor* visitor); |
| 101 RawInstructions* FindObjectInStubCodeSpace(FindObjectVisitor* visitor); | 101 RawInstructions* FindObjectInStubCodeSpace(FindObjectVisitor* visitor); |
| 102 | 102 |
| 103 void Scavenge(ApiCallbacks api_callbacks = kIgnoreApiCallbacks); |
| 103 void CollectGarbage(Space space); | 104 void CollectGarbage(Space space); |
| 104 void CollectGarbage(Space space, ApiCallbacks api_callbacks); | 105 void CollectGarbage(Space space, ApiCallbacks api_callbacks); |
| 105 void CollectAllGarbage(); | 106 void CollectAllGarbage(); |
| 106 | 107 |
| 107 // Enables growth control on the page space heaps. This should be | 108 // Enables growth control on the page space heaps. This should be |
| 108 // called before any user code is executed. | 109 // called before any user code is executed. |
| 109 void EnableGrowthControl(); | 110 void EnableGrowthControl(); |
| 110 | 111 |
| 111 // Accessors for inlined allocation in generated code. | 112 // Accessors for inlined allocation in generated code. |
| 112 uword TopAddress(); | 113 uword TopAddress(); |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 public: | 155 public: |
| 155 NoGCScope() {} | 156 NoGCScope() {} |
| 156 private: | 157 private: |
| 157 DISALLOW_COPY_AND_ASSIGN(NoGCScope); | 158 DISALLOW_COPY_AND_ASSIGN(NoGCScope); |
| 158 }; | 159 }; |
| 159 #endif // defined(DEBUG) | 160 #endif // defined(DEBUG) |
| 160 | 161 |
| 161 } // namespace dart | 162 } // namespace dart |
| 162 | 163 |
| 163 #endif // VM_HEAP_H_ | 164 #endif // VM_HEAP_H_ |
| OLD | NEW |