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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
122 bool GrowthControlState(); | 122 bool GrowthControlState(); |
123 | 123 |
124 // Protect access to the heap. Note: Code pages are made | 124 // Protect access to the heap. Note: Code pages are made |
125 // executable/non-executable when 'read_only' is true/false, respectively. | 125 // executable/non-executable when 'read_only' is true/false, respectively. |
126 void WriteProtect(bool read_only); | 126 void WriteProtect(bool read_only); |
127 void WriteProtectCode(bool read_only) { | 127 void WriteProtectCode(bool read_only) { |
128 old_space_.WriteProtectCode(read_only); | 128 old_space_.WriteProtectCode(read_only); |
129 } | 129 } |
130 | 130 |
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); |
rmacnak
2017/06/22 22:31:50
Both should be unused, no?
danunez
2017/06/30 20:35:57
Yes, but I left this in for testing. Incoming set
| |
133 static intptr_t EndOffset(Space space); | |
134 | 133 |
135 // Initialize the heap and register it with the isolate. | 134 // Initialize the heap and register it with the isolate. |
136 static void Init(Isolate* isolate, | 135 static void Init(Isolate* isolate, |
137 intptr_t max_new_gen_words, | 136 intptr_t max_new_gen_words, |
138 intptr_t max_old_gen_words, | 137 intptr_t max_old_gen_words, |
139 intptr_t max_external_words); | 138 intptr_t max_external_words); |
140 | 139 |
141 // Verify that all pointers in the heap point to the heap. | 140 // Verify that all pointers in the heap point to the heap. |
142 bool Verify(MarkExpectation mark_expectation = kForbidMarked) const; | 141 bool Verify(MarkExpectation mark_expectation = kForbidMarked) const; |
143 | 142 |
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
387 // Note: During this scope, the code pages are non-executable. | 386 // Note: During this scope, the code pages are non-executable. |
388 class WritableVMIsolateScope : StackResource { | 387 class WritableVMIsolateScope : StackResource { |
389 public: | 388 public: |
390 explicit WritableVMIsolateScope(Thread* thread); | 389 explicit WritableVMIsolateScope(Thread* thread); |
391 ~WritableVMIsolateScope(); | 390 ~WritableVMIsolateScope(); |
392 }; | 391 }; |
393 | 392 |
394 } // namespace dart | 393 } // namespace dart |
395 | 394 |
396 #endif // RUNTIME_VM_HEAP_H_ | 395 #endif // RUNTIME_VM_HEAP_H_ |
OLD | NEW |