OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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_SPACES_H_ | 5 #ifndef V8_HEAP_SPACES_H_ |
6 #define V8_HEAP_SPACES_H_ | 6 #define V8_HEAP_SPACES_H_ |
7 | 7 |
8 #include "src/allocation.h" | 8 #include "src/allocation.h" |
9 #include "src/atomic-utils.h" | 9 #include "src/atomic-utils.h" |
10 #include "src/base/atomicops.h" | 10 #include "src/base/atomicops.h" |
(...skipping 2871 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2882 LargePage* FindPage(Address a); | 2882 LargePage* FindPage(Address a); |
2883 | 2883 |
2884 // Clears the marking state of live objects. | 2884 // Clears the marking state of live objects. |
2885 void ClearMarkingStateOfLiveObjects(); | 2885 void ClearMarkingStateOfLiveObjects(); |
2886 | 2886 |
2887 // Frees unmarked objects. | 2887 // Frees unmarked objects. |
2888 void FreeUnmarkedObjects(); | 2888 void FreeUnmarkedObjects(); |
2889 | 2889 |
2890 // Checks whether a heap object is in this space; O(1). | 2890 // Checks whether a heap object is in this space; O(1). |
2891 bool Contains(HeapObject* obj); | 2891 bool Contains(HeapObject* obj); |
| 2892 bool Contains(Address address); |
2892 | 2893 |
2893 // Checks whether the space is empty. | 2894 // Checks whether the space is empty. |
2894 bool IsEmpty() { return first_page_ == NULL; } | 2895 bool IsEmpty() { return first_page_ == NULL; } |
2895 | 2896 |
2896 LargePage* first_page() { return first_page_; } | 2897 LargePage* first_page() { return first_page_; } |
2897 | 2898 |
2898 #ifdef VERIFY_HEAP | 2899 #ifdef VERIFY_HEAP |
2899 virtual void Verify(); | 2900 virtual void Verify(); |
2900 #endif | 2901 #endif |
2901 | 2902 |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2965 count = 0; | 2966 count = 0; |
2966 } | 2967 } |
2967 // Must be small, since an iteration is used for lookup. | 2968 // Must be small, since an iteration is used for lookup. |
2968 static const int kMaxComments = 64; | 2969 static const int kMaxComments = 64; |
2969 }; | 2970 }; |
2970 #endif | 2971 #endif |
2971 } | 2972 } |
2972 } // namespace v8::internal | 2973 } // namespace v8::internal |
2973 | 2974 |
2974 #endif // V8_HEAP_SPACES_H_ | 2975 #endif // V8_HEAP_SPACES_H_ |
OLD | NEW |