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/base/atomicops.h" | 9 #include "src/base/atomicops.h" |
10 #include "src/base/bits.h" | 10 #include "src/base/bits.h" |
(...skipping 1901 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1912 | 1912 |
1913 void set_end_of_unswept_pages(Page* page) { end_of_unswept_pages_ = page; } | 1913 void set_end_of_unswept_pages(Page* page) { end_of_unswept_pages_ = page; } |
1914 | 1914 |
1915 Page* end_of_unswept_pages() { return end_of_unswept_pages_; } | 1915 Page* end_of_unswept_pages() { return end_of_unswept_pages_; } |
1916 | 1916 |
1917 Page* FirstPage() { return anchor_.next_page(); } | 1917 Page* FirstPage() { return anchor_.next_page(); } |
1918 Page* LastPage() { return anchor_.prev_page(); } | 1918 Page* LastPage() { return anchor_.prev_page(); } |
1919 | 1919 |
1920 void EvictEvacuationCandidatesFromFreeLists(); | 1920 void EvictEvacuationCandidatesFromFreeLists(); |
1921 | 1921 |
1922 bool CanExpand(); | 1922 bool CanExpand(size_t size); |
1923 | 1923 |
1924 // Returns the number of total pages in this space. | 1924 // Returns the number of total pages in this space. |
1925 int CountTotalPages(); | 1925 int CountTotalPages(); |
1926 | 1926 |
1927 // Return size of allocatable area on a page in this space. | 1927 // Return size of allocatable area on a page in this space. |
1928 inline int AreaSize() { return area_size_; } | 1928 inline int AreaSize() { return area_size_; } |
1929 | 1929 |
1930 void CreateEmergencyMemory(); | 1930 void CreateEmergencyMemory(); |
1931 void FreeEmergencyMemory(); | 1931 void FreeEmergencyMemory(); |
1932 void UseEmergencyMemory(); | 1932 void UseEmergencyMemory(); |
(...skipping 962 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2895 count = 0; | 2895 count = 0; |
2896 } | 2896 } |
2897 // Must be small, since an iteration is used for lookup. | 2897 // Must be small, since an iteration is used for lookup. |
2898 static const int kMaxComments = 64; | 2898 static const int kMaxComments = 64; |
2899 }; | 2899 }; |
2900 #endif | 2900 #endif |
2901 } | 2901 } |
2902 } // namespace v8::internal | 2902 } // namespace v8::internal |
2903 | 2903 |
2904 #endif // V8_HEAP_SPACES_H_ | 2904 #endif // V8_HEAP_SPACES_H_ |
OLD | NEW |