| 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 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 317 uword* EndAddress() { return &bump_end_; } | 317 uword* EndAddress() { return &bump_end_; } |
| 318 static intptr_t top_offset() { return OFFSET_OF(PageSpace, bump_top_); } | 318 static intptr_t top_offset() { return OFFSET_OF(PageSpace, bump_top_); } |
| 319 static intptr_t end_offset() { return OFFSET_OF(PageSpace, bump_end_); } | 319 static intptr_t end_offset() { return OFFSET_OF(PageSpace, bump_end_); } |
| 320 | 320 |
| 321 void SetupImagePage(void* pointer, uword size, bool is_executable); | 321 void SetupImagePage(void* pointer, uword size, bool is_executable); |
| 322 | 322 |
| 323 private: | 323 private: |
| 324 // Ids for time and data records in Heap::GCStats. | 324 // Ids for time and data records in Heap::GCStats. |
| 325 enum { | 325 enum { |
| 326 // Time | 326 // Time |
| 327 kMarkObjects = 0, | 327 kConcurrentSweep = 0, |
| 328 kResetFreeLists = 1, | 328 kSafePoint = 1, |
| 329 kSweepPages = 2, | 329 kMarkObjects = 2, |
| 330 kSweepLargePages = 3, | 330 kResetFreeLists = 3, |
| 331 kSweepPages = 4, |
| 332 kSweepLargePages = 5, |
| 331 // Data | 333 // Data |
| 332 kGarbageRatio = 0, | 334 kGarbageRatio = 0, |
| 333 kGCTimeFraction = 1, | 335 kGCTimeFraction = 1, |
| 334 kPageGrowth = 2, | 336 kPageGrowth = 2, |
| 335 kAllowedGrowth = 3 | 337 kAllowedGrowth = 3 |
| 336 }; | 338 }; |
| 337 | 339 |
| 338 static const intptr_t kAllocatablePageSize = 64 * KB; | 340 static const intptr_t kAllocatablePageSize = 64 * KB; |
| 339 | 341 |
| 340 uword TryAllocateInternal(intptr_t size, | 342 uword TryAllocateInternal(intptr_t size, |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 425 friend class HeapIterationScope; | 427 friend class HeapIterationScope; |
| 426 friend class PageSpaceController; | 428 friend class PageSpaceController; |
| 427 friend class SweeperTask; | 429 friend class SweeperTask; |
| 428 | 430 |
| 429 DISALLOW_IMPLICIT_CONSTRUCTORS(PageSpace); | 431 DISALLOW_IMPLICIT_CONSTRUCTORS(PageSpace); |
| 430 }; | 432 }; |
| 431 | 433 |
| 432 } // namespace dart | 434 } // namespace dart |
| 433 | 435 |
| 434 #endif // RUNTIME_VM_PAGES_H_ | 436 #endif // RUNTIME_VM_PAGES_H_ |
| OLD | NEW |