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 | 9 |
10 #include "src/allocation.h" | 10 #include "src/allocation.h" |
(...skipping 2788 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2799 // same page, so FromSpaceStart() might be above FromSpaceEnd(). | 2799 // same page, so FromSpaceStart() might be above FromSpaceEnd(). |
2800 Address FromSpacePageLow() { return from_space_.page_low(); } | 2800 Address FromSpacePageLow() { return from_space_.page_low(); } |
2801 Address FromSpacePageHigh() { return from_space_.page_high(); } | 2801 Address FromSpacePageHigh() { return from_space_.page_high(); } |
2802 Address FromSpaceStart() { return from_space_.space_start(); } | 2802 Address FromSpaceStart() { return from_space_.space_start(); } |
2803 Address FromSpaceEnd() { return from_space_.space_end(); } | 2803 Address FromSpaceEnd() { return from_space_.space_end(); } |
2804 | 2804 |
2805 // Get the extent of the active semispace's pages' memory. | 2805 // Get the extent of the active semispace's pages' memory. |
2806 Address ToSpaceStart() { return to_space_.space_start(); } | 2806 Address ToSpaceStart() { return to_space_.space_start(); } |
2807 Address ToSpaceEnd() { return to_space_.space_end(); } | 2807 Address ToSpaceEnd() { return to_space_.space_end(); } |
2808 | 2808 |
| 2809 SemiSpace* from_space() { return &from_space_; } |
| 2810 |
2809 inline bool ToSpaceContainsSlow(Address a); | 2811 inline bool ToSpaceContainsSlow(Address a); |
2810 inline bool FromSpaceContainsSlow(Address a); | 2812 inline bool FromSpaceContainsSlow(Address a); |
2811 inline bool ToSpaceContains(Object* o); | 2813 inline bool ToSpaceContains(Object* o); |
2812 inline bool FromSpaceContains(Object* o); | 2814 inline bool FromSpaceContains(Object* o); |
2813 | 2815 |
2814 // Try to switch the active semispace to a new, empty, page. | 2816 // Try to switch the active semispace to a new, empty, page. |
2815 // Returns false if this isn't possible or reasonable (i.e., there | 2817 // Returns false if this isn't possible or reasonable (i.e., there |
2816 // are no pages, or the current page is already empty), or true | 2818 // are no pages, or the current page is already empty), or true |
2817 // if successful. | 2819 // if successful. |
2818 bool AddFreshPage(); | 2820 bool AddFreshPage(); |
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3144 count = 0; | 3146 count = 0; |
3145 } | 3147 } |
3146 // Must be small, since an iteration is used for lookup. | 3148 // Must be small, since an iteration is used for lookup. |
3147 static const int kMaxComments = 64; | 3149 static const int kMaxComments = 64; |
3148 }; | 3150 }; |
3149 #endif | 3151 #endif |
3150 } // namespace internal | 3152 } // namespace internal |
3151 } // namespace v8 | 3153 } // namespace v8 |
3152 | 3154 |
3153 #endif // V8_HEAP_SPACES_H_ | 3155 #endif // V8_HEAP_SPACES_H_ |
OLD | NEW |