OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef V8_HEAP_HEAP_H_ | 5 #ifndef V8_HEAP_HEAP_H_ |
6 #define V8_HEAP_HEAP_H_ | 6 #define V8_HEAP_HEAP_H_ |
7 | 7 |
8 #include <cmath> | 8 #include <cmath> |
9 #include <map> | 9 #include <map> |
10 | 10 |
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
294 class HeapObjectsFilter; | 294 class HeapObjectsFilter; |
295 class HeapStats; | 295 class HeapStats; |
296 class HistogramTimer; | 296 class HistogramTimer; |
297 class Isolate; | 297 class Isolate; |
298 class MemoryReducer; | 298 class MemoryReducer; |
299 class ObjectStats; | 299 class ObjectStats; |
300 class Scavenger; | 300 class Scavenger; |
301 class ScavengeJob; | 301 class ScavengeJob; |
302 class WeakObjectRetainer; | 302 class WeakObjectRetainer; |
303 | 303 |
304 enum PromotionMode { FORCE_PROMOTION, DEFAULT_PROMOTION }; | 304 typedef void (*ObjectSlotCallback)(HeapObject** from, HeapObject* to); |
305 | |
306 typedef void (*ObjectSlotCallback)(HeapObject** from, HeapObject* to, | |
307 PromotionMode mode); | |
308 | 305 |
309 // A queue of objects promoted during scavenge. Each object is accompanied | 306 // A queue of objects promoted during scavenge. Each object is accompanied |
310 // by it's size to avoid dereferencing a map pointer for scanning. | 307 // by it's size to avoid dereferencing a map pointer for scanning. |
311 // The last page in to-space is used for the promotion queue. On conflict | 308 // The last page in to-space is used for the promotion queue. On conflict |
312 // during scavenge, the promotion queue is allocated externally and all | 309 // during scavenge, the promotion queue is allocated externally and all |
313 // entries are copied to the external queue. | 310 // entries are copied to the external queue. |
314 class PromotionQueue { | 311 class PromotionQueue { |
315 public: | 312 public: |
316 explicit PromotionQueue(Heap* heap) | 313 explicit PromotionQueue(Heap* heap) |
317 : front_(NULL), | 314 : front_(NULL), |
(...skipping 2344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2662 friend class LargeObjectSpace; | 2659 friend class LargeObjectSpace; |
2663 friend class NewSpace; | 2660 friend class NewSpace; |
2664 friend class PagedSpace; | 2661 friend class PagedSpace; |
2665 DISALLOW_COPY_AND_ASSIGN(AllocationObserver); | 2662 DISALLOW_COPY_AND_ASSIGN(AllocationObserver); |
2666 }; | 2663 }; |
2667 | 2664 |
2668 } // namespace internal | 2665 } // namespace internal |
2669 } // namespace v8 | 2666 } // namespace v8 |
2670 | 2667 |
2671 #endif // V8_HEAP_HEAP_H_ | 2668 #endif // V8_HEAP_HEAP_H_ |
OLD | NEW |