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