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 <list> | 8 #include <list> |
9 | 9 |
10 #include "src/allocation.h" | 10 #include "src/allocation.h" |
(...skipping 3033 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3044 // Finds a large object page containing the given address, returns NULL | 3044 // Finds a large object page containing the given address, returns NULL |
3045 // if such a page doesn't exist. | 3045 // if such a page doesn't exist. |
3046 LargePage* FindPage(Address a); | 3046 LargePage* FindPage(Address a); |
3047 | 3047 |
3048 // Clears the marking state of live objects. | 3048 // Clears the marking state of live objects. |
3049 void ClearMarkingStateOfLiveObjects(); | 3049 void ClearMarkingStateOfLiveObjects(); |
3050 | 3050 |
3051 // Frees unmarked objects. | 3051 // Frees unmarked objects. |
3052 void FreeUnmarkedObjects(); | 3052 void FreeUnmarkedObjects(); |
3053 | 3053 |
| 3054 void InsertChunkMapEntries(LargePage* page); |
| 3055 void RemoveChunkMapEntries(LargePage* page); |
| 3056 void RemoveChunkMapEntries(LargePage* page, Address free_start); |
| 3057 |
3054 // Checks whether a heap object is in this space; O(1). | 3058 // Checks whether a heap object is in this space; O(1). |
3055 bool Contains(HeapObject* obj); | 3059 bool Contains(HeapObject* obj); |
3056 // Checks whether an address is in the object area in this space. Iterates | 3060 // Checks whether an address is in the object area in this space. Iterates |
3057 // all objects in the space. May be slow. | 3061 // all objects in the space. May be slow. |
3058 bool ContainsSlow(Address addr) { return FindObject(addr)->IsHeapObject(); } | 3062 bool ContainsSlow(Address addr) { return FindObject(addr)->IsHeapObject(); } |
3059 | 3063 |
3060 // Checks whether the space is empty. | 3064 // Checks whether the space is empty. |
3061 bool IsEmpty() { return first_page_ == NULL; } | 3065 bool IsEmpty() { return first_page_ == NULL; } |
3062 | 3066 |
3063 void AdjustLiveBytes(int by) { objects_size_ += by; } | 3067 void AdjustLiveBytes(int by) { objects_size_ += by; } |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3147 count = 0; | 3151 count = 0; |
3148 } | 3152 } |
3149 // Must be small, since an iteration is used for lookup. | 3153 // Must be small, since an iteration is used for lookup. |
3150 static const int kMaxComments = 64; | 3154 static const int kMaxComments = 64; |
3151 }; | 3155 }; |
3152 #endif | 3156 #endif |
3153 } // namespace internal | 3157 } // namespace internal |
3154 } // namespace v8 | 3158 } // namespace v8 |
3155 | 3159 |
3156 #endif // V8_HEAP_SPACES_H_ | 3160 #endif // V8_HEAP_SPACES_H_ |
OLD | NEW |