| 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 798 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 809 | 809 |
| 810 void CheckHandleCount(); | 810 void CheckHandleCount(); |
| 811 | 811 |
| 812 // Number of "runtime allocations" done so far. | 812 // Number of "runtime allocations" done so far. |
| 813 uint32_t allocations_count() { return allocations_count_; } | 813 uint32_t allocations_count() { return allocations_count_; } |
| 814 | 814 |
| 815 // Print short heap statistics. | 815 // Print short heap statistics. |
| 816 void PrintShortHeapStatistics(); | 816 void PrintShortHeapStatistics(); |
| 817 | 817 |
| 818 inline HeapState gc_state() { return gc_state_; } | 818 inline HeapState gc_state() { return gc_state_; } |
| 819 void SetGCState(HeapState state); |
| 819 | 820 |
| 820 inline bool IsInGCPostProcessing() { return gc_post_processing_depth_ > 0; } | 821 inline bool IsInGCPostProcessing() { return gc_post_processing_depth_ > 0; } |
| 821 | 822 |
| 822 // If an object has an AllocationMemento trailing it, return it, otherwise | 823 // If an object has an AllocationMemento trailing it, return it, otherwise |
| 823 // return NULL; | 824 // return NULL; |
| 824 template <FindMementoMode mode> | 825 template <FindMementoMode mode> |
| 825 inline AllocationMemento* FindAllocationMemento(HeapObject* object); | 826 inline AllocationMemento* FindAllocationMemento(HeapObject* object); |
| 826 | 827 |
| 827 // Returns false if not able to reserve. | 828 // Returns false if not able to reserve. |
| 828 bool ReserveSpace(Reservation* reservations, List<Address>* maps); | 829 bool ReserveSpace(Reservation* reservations, List<Address>* maps); |
| (...skipping 1816 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2645 friend class LargeObjectSpace; | 2646 friend class LargeObjectSpace; |
| 2646 friend class NewSpace; | 2647 friend class NewSpace; |
| 2647 friend class PagedSpace; | 2648 friend class PagedSpace; |
| 2648 DISALLOW_COPY_AND_ASSIGN(AllocationObserver); | 2649 DISALLOW_COPY_AND_ASSIGN(AllocationObserver); |
| 2649 }; | 2650 }; |
| 2650 | 2651 |
| 2651 } // namespace internal | 2652 } // namespace internal |
| 2652 } // namespace v8 | 2653 } // namespace v8 |
| 2653 | 2654 |
| 2654 #endif // V8_HEAP_HEAP_H_ | 2655 #endif // V8_HEAP_HEAP_H_ |
| OLD | NEW |