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 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 // replaced. A value of NULL disassociate an object from its peer. | 158 // replaced. A value of NULL disassociate an object from its peer. |
159 void SetPeer(RawObject* raw_obj, void* peer); | 159 void SetPeer(RawObject* raw_obj, void* peer); |
160 | 160 |
161 // Retrieves the peer associated with an object. Returns NULL if | 161 // Retrieves the peer associated with an object. Returns NULL if |
162 // there is no association. | 162 // there is no association. |
163 void* GetPeer(RawObject* raw_obj); | 163 void* GetPeer(RawObject* raw_obj); |
164 | 164 |
165 // Returns the number of objects with a peer. | 165 // Returns the number of objects with a peer. |
166 int64_t PeerCount() const; | 166 int64_t PeerCount() const; |
167 | 167 |
| 168 PageSpace* old_space() { return old_space_; } |
| 169 |
168 private: | 170 private: |
169 Heap(); | 171 Heap(); |
170 | 172 |
171 uword AllocateNew(intptr_t size); | 173 uword AllocateNew(intptr_t size); |
172 uword AllocateOld(intptr_t size, HeapPage::PageType type); | 174 uword AllocateOld(intptr_t size, HeapPage::PageType type); |
173 | 175 |
174 // The different spaces used for allocation. | 176 // The different spaces used for allocation. |
175 Scavenger* new_space_; | 177 Scavenger* new_space_; |
176 PageSpace* old_space_; | 178 PageSpace* old_space_; |
177 | 179 |
(...skipping 18 matching lines...) Expand all Loading... |
196 public: | 198 public: |
197 NoGCScope() {} | 199 NoGCScope() {} |
198 private: | 200 private: |
199 DISALLOW_COPY_AND_ASSIGN(NoGCScope); | 201 DISALLOW_COPY_AND_ASSIGN(NoGCScope); |
200 }; | 202 }; |
201 #endif // defined(DEBUG) | 203 #endif // defined(DEBUG) |
202 | 204 |
203 } // namespace dart | 205 } // namespace dart |
204 | 206 |
205 #endif // VM_HEAP_H_ | 207 #endif // VM_HEAP_H_ |
OLD | NEW |