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/atomic-utils.h" | 9 #include "src/atomic-utils.h" |
10 #include "src/base/atomicops.h" | 10 #include "src/base/atomicops.h" |
(...skipping 2676 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2687 return from_space_.Commit(); | 2687 return from_space_.Commit(); |
2688 } | 2688 } |
2689 | 2689 |
2690 bool UncommitFromSpace() { | 2690 bool UncommitFromSpace() { |
2691 if (!from_space_.is_committed()) return true; | 2691 if (!from_space_.is_committed()) return true; |
2692 return from_space_.Uncommit(); | 2692 return from_space_.Uncommit(); |
2693 } | 2693 } |
2694 | 2694 |
2695 bool IsFromSpaceCommitted() { return from_space_.is_committed(); } | 2695 bool IsFromSpaceCommitted() { return from_space_.is_committed(); } |
2696 | 2696 |
| 2697 inline intptr_t inline_allocation_limit_step() { |
| 2698 return inline_allocation_limit_step_; |
| 2699 } |
| 2700 |
2697 SemiSpace* active_space() { return &to_space_; } | 2701 SemiSpace* active_space() { return &to_space_; } |
2698 | 2702 |
2699 private: | 2703 private: |
2700 // Update allocation info to match the current to-space page. | 2704 // Update allocation info to match the current to-space page. |
2701 void UpdateAllocationInfo(); | 2705 void UpdateAllocationInfo(); |
2702 | 2706 |
2703 Address chunk_base_; | 2707 Address chunk_base_; |
2704 uintptr_t chunk_size_; | 2708 uintptr_t chunk_size_; |
2705 | 2709 |
2706 // The semispaces. | 2710 // The semispaces. |
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2986 count = 0; | 2990 count = 0; |
2987 } | 2991 } |
2988 // Must be small, since an iteration is used for lookup. | 2992 // Must be small, since an iteration is used for lookup. |
2989 static const int kMaxComments = 64; | 2993 static const int kMaxComments = 64; |
2990 }; | 2994 }; |
2991 #endif | 2995 #endif |
2992 } // namespace internal | 2996 } // namespace internal |
2993 } // namespace v8 | 2997 } // namespace v8 |
2994 | 2998 |
2995 #endif // V8_HEAP_SPACES_H_ | 2999 #endif // V8_HEAP_SPACES_H_ |
OLD | NEW |