| 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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 void AllocateExternal(intptr_t size, Space space); | 81 void AllocateExternal(intptr_t size, Space space); |
| 82 void FreeExternal(intptr_t size, Space space); | 82 void FreeExternal(intptr_t size, Space space); |
| 83 // Move external size from new to old space. Does not by itself trigger GC. | 83 // Move external size from new to old space. Does not by itself trigger GC. |
| 84 void PromoteExternal(intptr_t size); | 84 void PromoteExternal(intptr_t size); |
| 85 | 85 |
| 86 // Heap contains the specified address. | 86 // Heap contains the specified address. |
| 87 bool Contains(uword addr) const; | 87 bool Contains(uword addr) const; |
| 88 bool NewContains(uword addr) const; | 88 bool NewContains(uword addr) const; |
| 89 bool OldContains(uword addr) const; | 89 bool OldContains(uword addr) const; |
| 90 bool CodeContains(uword addr) const; | 90 bool CodeContains(uword addr) const; |
| 91 bool DataContains(uword addr) const; |
| 91 | 92 |
| 92 void IterateObjects(ObjectVisitor* visitor) const; | 93 void IterateObjects(ObjectVisitor* visitor) const; |
| 93 void IterateOldObjects(ObjectVisitor* visitor) const; | 94 void IterateOldObjects(ObjectVisitor* visitor) const; |
| 94 void IterateOldObjectsNoEmbedderPages(ObjectVisitor* visitor) const; | 95 void IterateOldObjectsNoEmbedderPages(ObjectVisitor* visitor) const; |
| 95 void IterateObjectPointers(ObjectVisitor* visitor) const; | 96 void IterateObjectPointers(ObjectVisitor* visitor) const; |
| 96 | 97 |
| 97 // Find an object by visiting all pointers in the specified heap space, | 98 // Find an object by visiting all pointers in the specified heap space, |
| 98 // the 'visitor' is used to determine if an object is found or not. | 99 // the 'visitor' is used to determine if an object is found or not. |
| 99 // The 'visitor' function should be set up to return true if the | 100 // The 'visitor' function should be set up to return true if the |
| 100 // object is found, traversal through the heap space stops at that | 101 // object is found, traversal through the heap space stops at that |
| (...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 386 // Note: During this scope, the code pages are non-executable. | 387 // Note: During this scope, the code pages are non-executable. |
| 387 class WritableVMIsolateScope : StackResource { | 388 class WritableVMIsolateScope : StackResource { |
| 388 public: | 389 public: |
| 389 explicit WritableVMIsolateScope(Thread* thread); | 390 explicit WritableVMIsolateScope(Thread* thread); |
| 390 ~WritableVMIsolateScope(); | 391 ~WritableVMIsolateScope(); |
| 391 }; | 392 }; |
| 392 | 393 |
| 393 } // namespace dart | 394 } // namespace dart |
| 394 | 395 |
| 395 #endif // RUNTIME_VM_HEAP_H_ | 396 #endif // RUNTIME_VM_HEAP_H_ |
| OLD | NEW |