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 2012 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2023 // It returns true when sweeping is completed and false otherwise. | 2023 // It returns true when sweeping is completed and false otherwise. |
2024 bool EnsureSweeperProgress(intptr_t size_in_bytes); | 2024 bool EnsureSweeperProgress(intptr_t size_in_bytes); |
2025 | 2025 |
2026 void set_end_of_unswept_pages(Page* page) { end_of_unswept_pages_ = page; } | 2026 void set_end_of_unswept_pages(Page* page) { end_of_unswept_pages_ = page; } |
2027 | 2027 |
2028 Page* end_of_unswept_pages() { return end_of_unswept_pages_; } | 2028 Page* end_of_unswept_pages() { return end_of_unswept_pages_; } |
2029 | 2029 |
2030 Page* FirstPage() { return anchor_.next_page(); } | 2030 Page* FirstPage() { return anchor_.next_page(); } |
2031 Page* LastPage() { return anchor_.prev_page(); } | 2031 Page* LastPage() { return anchor_.prev_page(); } |
2032 | 2032 |
2033 void EvictEvacuationCandidatesFromFreeLists(); | 2033 void EvictEvacuationCandidatesFromLinearAllocationArea(); |
2034 | 2034 |
2035 bool CanExpand(size_t size); | 2035 bool CanExpand(size_t size); |
2036 | 2036 |
2037 // Returns the number of total pages in this space. | 2037 // Returns the number of total pages in this space. |
2038 int CountTotalPages(); | 2038 int CountTotalPages(); |
2039 | 2039 |
2040 // Return size of allocatable area on a page in this space. | 2040 // Return size of allocatable area on a page in this space. |
2041 inline int AreaSize() { return area_size_; } | 2041 inline int AreaSize() { return area_size_; } |
2042 | 2042 |
2043 // Merges {other} into the current space. Note that this modifies {other}, | 2043 // Merges {other} into the current space. Note that this modifies {other}, |
(...skipping 965 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3009 count = 0; | 3009 count = 0; |
3010 } | 3010 } |
3011 // Must be small, since an iteration is used for lookup. | 3011 // Must be small, since an iteration is used for lookup. |
3012 static const int kMaxComments = 64; | 3012 static const int kMaxComments = 64; |
3013 }; | 3013 }; |
3014 #endif | 3014 #endif |
3015 } // namespace internal | 3015 } // namespace internal |
3016 } // namespace v8 | 3016 } // namespace v8 |
3017 | 3017 |
3018 #endif // V8_HEAP_SPACES_H_ | 3018 #endif // V8_HEAP_SPACES_H_ |
OLD | NEW |