| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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_PAGES_H_ | 5 #ifndef RUNTIME_VM_PAGES_H_ |
| 6 #define RUNTIME_VM_PAGES_H_ | 6 #define RUNTIME_VM_PAGES_H_ |
| 7 | 7 |
| 8 #include "vm/freelist.h" | 8 #include "vm/freelist.h" |
| 9 #include "vm/globals.h" | 9 #include "vm/globals.h" |
| 10 #include "vm/lockers.h" | 10 #include "vm/lockers.h" |
| (...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 220 void UpdateMaxUsed(); | 220 void UpdateMaxUsed(); |
| 221 | 221 |
| 222 int64_t ExternalInWords() const { return usage_.external_in_words; } | 222 int64_t ExternalInWords() const { return usage_.external_in_words; } |
| 223 SpaceUsage GetCurrentUsage() const { | 223 SpaceUsage GetCurrentUsage() const { |
| 224 MutexLocker ml(pages_lock_); | 224 MutexLocker ml(pages_lock_); |
| 225 return usage_; | 225 return usage_; |
| 226 } | 226 } |
| 227 | 227 |
| 228 bool Contains(uword addr) const; | 228 bool Contains(uword addr) const; |
| 229 bool Contains(uword addr, HeapPage::PageType type) const; | 229 bool Contains(uword addr, HeapPage::PageType type) const; |
| 230 bool DataContains(uword addr) const; |
| 230 bool IsValidAddress(uword addr) const { return Contains(addr); } | 231 bool IsValidAddress(uword addr) const { return Contains(addr); } |
| 231 | 232 |
| 232 void VisitObjects(ObjectVisitor* visitor) const; | 233 void VisitObjects(ObjectVisitor* visitor) const; |
| 233 void VisitObjectsNoEmbedderPages(ObjectVisitor* visitor) const; | 234 void VisitObjectsNoEmbedderPages(ObjectVisitor* visitor) const; |
| 234 void VisitObjectPointers(ObjectPointerVisitor* visitor) const; | 235 void VisitObjectPointers(ObjectPointerVisitor* visitor) const; |
| 235 | 236 |
| 236 RawObject* FindObject(FindObjectVisitor* visitor, | 237 RawObject* FindObject(FindObjectVisitor* visitor, |
| 237 HeapPage::PageType type) const; | 238 HeapPage::PageType type) const; |
| 238 | 239 |
| 239 // Checks if enough time has elapsed since the last attempt to collect | 240 // Checks if enough time has elapsed since the last attempt to collect |
| (...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 423 friend class HeapIterationScope; | 424 friend class HeapIterationScope; |
| 424 friend class PageSpaceController; | 425 friend class PageSpaceController; |
| 425 friend class SweeperTask; | 426 friend class SweeperTask; |
| 426 | 427 |
| 427 DISALLOW_IMPLICIT_CONSTRUCTORS(PageSpace); | 428 DISALLOW_IMPLICIT_CONSTRUCTORS(PageSpace); |
| 428 }; | 429 }; |
| 429 | 430 |
| 430 } // namespace dart | 431 } // namespace dart |
| 431 | 432 |
| 432 #endif // RUNTIME_VM_PAGES_H_ | 433 #endif // RUNTIME_VM_PAGES_H_ |
| OLD | NEW |