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 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 // Accessors for inlined allocation in generated code. | 131 // Accessors for inlined allocation in generated code. |
132 static intptr_t TopOffset(Space space); | 132 static intptr_t TopOffset(Space space); |
133 static intptr_t EndOffset(Space space); | 133 static intptr_t EndOffset(Space space); |
134 | 134 |
135 // Initialize the heap and register it with the isolate. | 135 // Initialize the heap and register it with the isolate. |
136 static void Init(Isolate* isolate, | 136 static void Init(Isolate* isolate, |
137 intptr_t max_new_gen_words, | 137 intptr_t max_new_gen_words, |
138 intptr_t max_old_gen_words, | 138 intptr_t max_old_gen_words, |
139 intptr_t max_external_words); | 139 intptr_t max_external_words); |
140 | 140 |
| 141 // Writes a suitable name for a VM region in the heap into the buffer `name`. |
| 142 static void RegionName(Heap* heap, |
| 143 Space space, |
| 144 char* name, |
| 145 intptr_t name_size); |
| 146 |
141 // Verify that all pointers in the heap point to the heap. | 147 // Verify that all pointers in the heap point to the heap. |
142 bool Verify(MarkExpectation mark_expectation = kForbidMarked) const; | 148 bool Verify(MarkExpectation mark_expectation = kForbidMarked) const; |
143 | 149 |
144 // Print heap sizes. | 150 // Print heap sizes. |
145 void PrintSizes() const; | 151 void PrintSizes() const; |
146 | 152 |
147 // Return amount of memory used and capacity in a space, excluding external. | 153 // Return amount of memory used and capacity in a space, excluding external. |
148 int64_t UsedInWords(Space space) const; | 154 int64_t UsedInWords(Space space) const; |
149 int64_t CapacityInWords(Space space) const; | 155 int64_t CapacityInWords(Space space) const; |
150 int64_t ExternalInWords(Space space) const; | 156 int64_t ExternalInWords(Space space) const; |
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
387 // Note: During this scope, the code pages are non-executable. | 393 // Note: During this scope, the code pages are non-executable. |
388 class WritableVMIsolateScope : StackResource { | 394 class WritableVMIsolateScope : StackResource { |
389 public: | 395 public: |
390 explicit WritableVMIsolateScope(Thread* thread); | 396 explicit WritableVMIsolateScope(Thread* thread); |
391 ~WritableVMIsolateScope(); | 397 ~WritableVMIsolateScope(); |
392 }; | 398 }; |
393 | 399 |
394 } // namespace dart | 400 } // namespace dart |
395 | 401 |
396 #endif // RUNTIME_VM_HEAP_H_ | 402 #endif // RUNTIME_VM_HEAP_H_ |
OLD | NEW |