OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 1802 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1813 bool CanExpand(); | 1813 bool CanExpand(); |
1814 | 1814 |
1815 // Returns the number of total pages in this space. | 1815 // Returns the number of total pages in this space. |
1816 int CountTotalPages(); | 1816 int CountTotalPages(); |
1817 | 1817 |
1818 // Return size of allocatable area on a page in this space. | 1818 // Return size of allocatable area on a page in this space. |
1819 inline int AreaSize() { | 1819 inline int AreaSize() { |
1820 return area_size_; | 1820 return area_size_; |
1821 } | 1821 } |
1822 | 1822 |
| 1823 bool ConstantAllocationSize() { |
| 1824 return identity() == MAP_SPACE || identity() == CELL_SPACE || |
| 1825 identity() == PROPERTY_CELL_SPACE; |
| 1826 } |
| 1827 |
1823 protected: | 1828 protected: |
1824 FreeList* free_list() { return &free_list_; } | 1829 FreeList* free_list() { return &free_list_; } |
1825 | 1830 |
1826 int area_size_; | 1831 int area_size_; |
1827 | 1832 |
1828 // Maximum capacity of this space. | 1833 // Maximum capacity of this space. |
1829 intptr_t max_capacity_; | 1834 intptr_t max_capacity_; |
1830 | 1835 |
1831 intptr_t SizeOfFirstPage(); | 1836 intptr_t SizeOfFirstPage(); |
1832 | 1837 |
(...skipping 1039 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2872 } | 2877 } |
2873 // Must be small, since an iteration is used for lookup. | 2878 // Must be small, since an iteration is used for lookup. |
2874 static const int kMaxComments = 64; | 2879 static const int kMaxComments = 64; |
2875 }; | 2880 }; |
2876 #endif | 2881 #endif |
2877 | 2882 |
2878 | 2883 |
2879 } } // namespace v8::internal | 2884 } } // namespace v8::internal |
2880 | 2885 |
2881 #endif // V8_SPACES_H_ | 2886 #endif // V8_SPACES_H_ |
OLD | NEW |