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_H_ | 5 #ifndef V8_HEAP_H_ |
6 #define V8_HEAP_H_ | 6 #define V8_HEAP_H_ |
7 | 7 |
8 #include <cmath> | 8 #include <cmath> |
9 | 9 |
10 #include "allocation.h" | 10 #include "allocation.h" |
(...skipping 744 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
755 // non-zero, then the slower precise sweeper is used, which leaves the heap | 755 // non-zero, then the slower precise sweeper is used, which leaves the heap |
756 // in a state where we can iterate over the heap visiting all objects. | 756 // in a state where we can iterate over the heap visiting all objects. |
757 void CollectAllGarbage( | 757 void CollectAllGarbage( |
758 int flags, | 758 int flags, |
759 const char* gc_reason = NULL, | 759 const char* gc_reason = NULL, |
760 const GCCallbackFlags gc_callback_flags = kNoGCCallbackFlags); | 760 const GCCallbackFlags gc_callback_flags = kNoGCCallbackFlags); |
761 | 761 |
762 // Last hope GC, should try to squeeze as much as possible. | 762 // Last hope GC, should try to squeeze as much as possible. |
763 void CollectAllAvailableGarbage(const char* gc_reason = NULL); | 763 void CollectAllAvailableGarbage(const char* gc_reason = NULL); |
764 | 764 |
765 // Check whether the heap is currently iterable. | |
766 bool IsHeapIterable(); | |
767 | |
768 // Ensure that we have swept all spaces in such a way that we can iterate | 765 // Ensure that we have swept all spaces in such a way that we can iterate |
769 // over all objects. May cause a GC. | 766 // over all objects. May cause a GC. |
770 void EnsureHeapIsIterable(); | 767 void EnsureHeapIsIterable(); |
771 | 768 |
772 // Notify the heap that a context has been disposed. | 769 // Notify the heap that a context has been disposed. |
773 int NotifyContextDisposed(); | 770 int NotifyContextDisposed(); |
774 | 771 |
775 inline void increment_scan_on_scavenge_pages() { | 772 inline void increment_scan_on_scavenge_pages() { |
776 scan_on_scavenge_pages_++; | 773 scan_on_scavenge_pages_++; |
777 if (FLAG_gc_verbose) { | 774 if (FLAG_gc_verbose) { |
(...skipping 2040 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2818 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. | 2815 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. |
2819 | 2816 |
2820 private: | 2817 private: |
2821 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); | 2818 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); |
2822 }; | 2819 }; |
2823 #endif // DEBUG | 2820 #endif // DEBUG |
2824 | 2821 |
2825 } } // namespace v8::internal | 2822 } } // namespace v8::internal |
2826 | 2823 |
2827 #endif // V8_HEAP_H_ | 2824 #endif // V8_HEAP_H_ |
OLD | NEW |