| 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 #include <memory> | 9 #include <memory> | 
| 10 #include <unordered_set> | 10 #include <unordered_set> | 
| (...skipping 1896 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1907 | 1907 | 
| 1908   // Returns true if the space has been successfully set up and not | 1908   // Returns true if the space has been successfully set up and not | 
| 1909   // subsequently torn down. | 1909   // subsequently torn down. | 
| 1910   bool HasBeenSetUp(); | 1910   bool HasBeenSetUp(); | 
| 1911 | 1911 | 
| 1912   // Checks whether an object/address is in this space. | 1912   // Checks whether an object/address is in this space. | 
| 1913   inline bool Contains(Address a); | 1913   inline bool Contains(Address a); | 
| 1914   inline bool Contains(Object* o); | 1914   inline bool Contains(Object* o); | 
| 1915   bool ContainsSlow(Address addr); | 1915   bool ContainsSlow(Address addr); | 
| 1916 | 1916 | 
| 1917   // Given an address occupied by a live object, return that object if it is |  | 
| 1918   // in this space, or a Smi if it is not.  The implementation iterates over |  | 
| 1919   // objects in the page containing the address, the cost is linear in the |  | 
| 1920   // number of objects in the page.  It may be slow. |  | 
| 1921   Object* FindObject(Address addr); |  | 
| 1922 |  | 
| 1923   // During boot the free_space_map is created, and afterwards we may need | 1917   // During boot the free_space_map is created, and afterwards we may need | 
| 1924   // to write it into the free list nodes that were already created. | 1918   // to write it into the free list nodes that were already created. | 
| 1925   void RepairFreeListsAfterDeserialization(); | 1919   void RepairFreeListsAfterDeserialization(); | 
| 1926 | 1920 | 
| 1927   // Prepares for a mark-compact GC. | 1921   // Prepares for a mark-compact GC. | 
| 1928   void PrepareForMarkCompact(); | 1922   void PrepareForMarkCompact(); | 
| 1929 | 1923 | 
| 1930   // Current capacity without growing (Size() + Available()). | 1924   // Current capacity without growing (Size() + Available()). | 
| 1931   size_t Capacity() { return accounting_stats_.Capacity(); } | 1925   size_t Capacity() { return accounting_stats_.Capacity(); } | 
| 1932 | 1926 | 
| (...skipping 983 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 2916   PageIterator old_iterator_; | 2910   PageIterator old_iterator_; | 
| 2917   PageIterator code_iterator_; | 2911   PageIterator code_iterator_; | 
| 2918   PageIterator map_iterator_; | 2912   PageIterator map_iterator_; | 
| 2919   LargePageIterator lo_iterator_; | 2913   LargePageIterator lo_iterator_; | 
| 2920 }; | 2914 }; | 
| 2921 | 2915 | 
| 2922 }  // namespace internal | 2916 }  // namespace internal | 
| 2923 }  // namespace v8 | 2917 }  // namespace v8 | 
| 2924 | 2918 | 
| 2925 #endif  // V8_HEAP_SPACES_H_ | 2919 #endif  // V8_HEAP_SPACES_H_ | 
| OLD | NEW | 
|---|