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 1816 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1827 // Constructor. | 1827 // Constructor. |
1828 SemiSpace(Heap* heap, SemiSpaceId semispace) | 1828 SemiSpace(Heap* heap, SemiSpaceId semispace) |
1829 : Space(heap, NEW_SPACE, NOT_EXECUTABLE), | 1829 : Space(heap, NEW_SPACE, NOT_EXECUTABLE), |
1830 start_(NULL), | 1830 start_(NULL), |
1831 age_mark_(NULL), | 1831 age_mark_(NULL), |
1832 id_(semispace), | 1832 id_(semispace), |
1833 anchor_(this), | 1833 anchor_(this), |
1834 current_page_(NULL) { } | 1834 current_page_(NULL) { } |
1835 | 1835 |
1836 // Sets up the semispace using the given chunk. | 1836 // Sets up the semispace using the given chunk. |
1837 bool SetUp(Address start, int initial_capacity, int maximum_capacity); | 1837 void SetUp(Address start, int initial_capacity, int maximum_capacity); |
1838 | 1838 |
1839 // Tear down the space. Heap memory was not allocated by the space, so it | 1839 // Tear down the space. Heap memory was not allocated by the space, so it |
1840 // is not deallocated here. | 1840 // is not deallocated here. |
1841 void TearDown(); | 1841 void TearDown(); |
1842 | 1842 |
1843 // True if the space has been set up but not torn down. | 1843 // True if the space has been set up but not torn down. |
1844 bool HasBeenSetUp() { return start_ != NULL; } | 1844 bool HasBeenSetUp() { return start_ != NULL; } |
1845 | 1845 |
1846 // Grow the semispace to the new capacity. The new capacity | 1846 // Grow the semispace to the new capacity. The new capacity |
1847 // requested must be larger than the current capacity and less than | 1847 // requested must be larger than the current capacity and less than |
(...skipping 808 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2656 } | 2656 } |
2657 // Must be small, since an iteration is used for lookup. | 2657 // Must be small, since an iteration is used for lookup. |
2658 static const int kMaxComments = 64; | 2658 static const int kMaxComments = 64; |
2659 }; | 2659 }; |
2660 #endif | 2660 #endif |
2661 | 2661 |
2662 | 2662 |
2663 } } // namespace v8::internal | 2663 } } // namespace v8::internal |
2664 | 2664 |
2665 #endif // V8_SPACES_H_ | 2665 #endif // V8_SPACES_H_ |
OLD | NEW |