| 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 kSafePoint = 0, |
| 328 kResetFreeLists = 1, | 328 kMarkObjects = 1, |
| 329 kSweepPages = 2, | 329 kResetFreeLists = 2, |
| 330 kSweepLargePages = 3, | 330 kSweepPages = 3, |
| 331 kSweepLargePages = 4, |
| 331 // Data | 332 // Data |
| 332 kGarbageRatio = 0, | 333 kGarbageRatio = 0, |
| 333 kGCTimeFraction = 1, | 334 kGCTimeFraction = 1, |
| 334 kPageGrowth = 2, | 335 kPageGrowth = 2, |
| 335 kAllowedGrowth = 3 | 336 kAllowedGrowth = 3 |
| 336 }; | 337 }; |
| 337 | 338 |
| 338 static const intptr_t kAllocatablePageSize = 64 * KB; | 339 static const intptr_t kAllocatablePageSize = 64 * KB; |
| 339 | 340 |
| 340 uword TryAllocateInternal(intptr_t size, | 341 uword TryAllocateInternal(intptr_t size, |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 425 friend class HeapIterationScope; | 426 friend class HeapIterationScope; |
| 426 friend class PageSpaceController; | 427 friend class PageSpaceController; |
| 427 friend class SweeperTask; | 428 friend class SweeperTask; |
| 428 | 429 |
| 429 DISALLOW_IMPLICIT_CONSTRUCTORS(PageSpace); | 430 DISALLOW_IMPLICIT_CONSTRUCTORS(PageSpace); |
| 430 }; | 431 }; |
| 431 | 432 |
| 432 } // namespace dart | 433 } // namespace dart |
| 433 | 434 |
| 434 #endif // RUNTIME_VM_PAGES_H_ | 435 #endif // RUNTIME_VM_PAGES_H_ |
| OLD | NEW |