Chromium Code Reviews| 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 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 303 | 303 |
| 304 // Updates gc_in_progress. | 304 // Updates gc_in_progress. |
| 305 void BeginGC(); | 305 void BeginGC(); |
| 306 void EndGC(); | 306 void EndGC(); |
| 307 | 307 |
| 308 // If this heap is non-empty, updates start and end to the smallest range that | 308 // If this heap is non-empty, updates start and end to the smallest range that |
| 309 // contains both the original [start, end) and the [lowest, highest) addresses | 309 // contains both the original [start, end) and the [lowest, highest) addresses |
| 310 // of this heap. | 310 // of this heap. |
| 311 void GetMergedAddressRange(uword* start, uword* end) const; | 311 void GetMergedAddressRange(uword* start, uword* end) const; |
| 312 | 312 |
| 313 Isolate* isolate_; | |
| 314 | |
| 315 // The different spaces used for allocation. | 313 // The different spaces used for allocation. |
| 316 Scavenger new_space_; | 314 Scavenger new_space_; |
| 317 PageSpace old_space_; | 315 PageSpace old_space_; |
| 318 | 316 |
| 317 Isolate* isolate_; | |
|
Florian Schneider
2015/09/30 09:38:13
This seems still fragile, since there are members
rmacnak
2015/10/01 22:00:49
This is to get Heap::Top/EndOffset(kNew) consisten
| |
| 318 | |
| 319 WeakTable* new_weak_tables_[kNumWeakSelectors]; | 319 WeakTable* new_weak_tables_[kNumWeakSelectors]; |
| 320 WeakTable* old_weak_tables_[kNumWeakSelectors]; | 320 WeakTable* old_weak_tables_[kNumWeakSelectors]; |
| 321 | 321 |
| 322 // GC stats collection. | 322 // GC stats collection. |
| 323 GCStats stats_; | 323 GCStats stats_; |
| 324 | 324 |
| 325 // This heap is in read-only mode: No allocation is allowed. | 325 // This heap is in read-only mode: No allocation is allowed. |
| 326 bool read_only_; | 326 bool read_only_; |
| 327 | 327 |
| 328 // GC on the heap is in progress. | 328 // GC on the heap is in progress. |
| (...skipping 25 matching lines...) Expand all Loading... | |
| 354 NoHeapGrowthControlScope(); | 354 NoHeapGrowthControlScope(); |
| 355 ~NoHeapGrowthControlScope(); | 355 ~NoHeapGrowthControlScope(); |
| 356 private: | 356 private: |
| 357 bool current_growth_controller_state_; | 357 bool current_growth_controller_state_; |
| 358 DISALLOW_COPY_AND_ASSIGN(NoHeapGrowthControlScope); | 358 DISALLOW_COPY_AND_ASSIGN(NoHeapGrowthControlScope); |
| 359 }; | 359 }; |
| 360 | 360 |
| 361 } // namespace dart | 361 } // namespace dart |
| 362 | 362 |
| 363 #endif // VM_HEAP_H_ | 363 #endif // VM_HEAP_H_ |
| OLD | NEW |