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 2589 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2600 bool CommitFromSpaceIfNeeded() { | 2600 bool CommitFromSpaceIfNeeded() { |
2601 if (from_space_.is_committed()) return true; | 2601 if (from_space_.is_committed()) return true; |
2602 return from_space_.Commit(); | 2602 return from_space_.Commit(); |
2603 } | 2603 } |
2604 | 2604 |
2605 bool UncommitFromSpace() { | 2605 bool UncommitFromSpace() { |
2606 if (!from_space_.is_committed()) return true; | 2606 if (!from_space_.is_committed()) return true; |
2607 return from_space_.Uncommit(); | 2607 return from_space_.Uncommit(); |
2608 } | 2608 } |
2609 | 2609 |
| 2610 bool IsFromSpaceCommitted() { return from_space_.is_committed(); } |
| 2611 |
2610 inline intptr_t inline_allocation_limit_step() { | 2612 inline intptr_t inline_allocation_limit_step() { |
2611 return inline_allocation_limit_step_; | 2613 return inline_allocation_limit_step_; |
2612 } | 2614 } |
2613 | 2615 |
2614 SemiSpace* active_space() { return &to_space_; } | 2616 SemiSpace* active_space() { return &to_space_; } |
2615 | 2617 |
2616 private: | 2618 private: |
2617 // Update allocation info to match the current to-space page. | 2619 // Update allocation info to match the current to-space page. |
2618 void UpdateAllocationInfo(); | 2620 void UpdateAllocationInfo(); |
2619 | 2621 |
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2888 count = 0; | 2890 count = 0; |
2889 } | 2891 } |
2890 // Must be small, since an iteration is used for lookup. | 2892 // Must be small, since an iteration is used for lookup. |
2891 static const int kMaxComments = 64; | 2893 static const int kMaxComments = 64; |
2892 }; | 2894 }; |
2893 #endif | 2895 #endif |
2894 } | 2896 } |
2895 } // namespace v8::internal | 2897 } // namespace v8::internal |
2896 | 2898 |
2897 #endif // V8_HEAP_SPACES_H_ | 2899 #endif // V8_HEAP_SPACES_H_ |
OLD | NEW |