OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #include "src/accessors.h" | 7 #include "src/accessors.h" |
8 #include "src/api.h" | 8 #include "src/api.h" |
9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
10 #include "src/base/once.h" | 10 #include "src/base/once.h" |
(...skipping 5041 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5052 "semi-space size of %d MB\n", | 5052 "semi-space size of %d MB\n", |
5053 max_semi_space_size_ / MB); | 5053 max_semi_space_size_ / MB); |
5054 } | 5054 } |
5055 } else { | 5055 } else { |
5056 target_semispace_size_ = target_semispace_size; | 5056 target_semispace_size_ = target_semispace_size; |
5057 } | 5057 } |
5058 } | 5058 } |
5059 | 5059 |
5060 target_semispace_size_ = Max(initial_semispace_size_, target_semispace_size_); | 5060 target_semispace_size_ = Max(initial_semispace_size_, target_semispace_size_); |
5061 | 5061 |
| 5062 if (FLAG_semi_space_growth_factor < 2) { |
| 5063 FLAG_semi_space_growth_factor = 2; |
| 5064 } |
| 5065 |
5062 // The old generation is paged and needs at least one page for each space. | 5066 // The old generation is paged and needs at least one page for each space. |
5063 int paged_space_count = LAST_PAGED_SPACE - FIRST_PAGED_SPACE + 1; | 5067 int paged_space_count = LAST_PAGED_SPACE - FIRST_PAGED_SPACE + 1; |
5064 max_old_generation_size_ = | 5068 max_old_generation_size_ = |
5065 Max(static_cast<intptr_t>(paged_space_count * Page::kPageSize), | 5069 Max(static_cast<intptr_t>(paged_space_count * Page::kPageSize), |
5066 max_old_generation_size_); | 5070 max_old_generation_size_); |
5067 | 5071 |
5068 // We rely on being able to allocate new arrays in paged spaces. | 5072 // We rely on being able to allocate new arrays in paged spaces. |
5069 DCHECK(Page::kMaxRegularHeapObjectSize >= | 5073 DCHECK(Page::kMaxRegularHeapObjectSize >= |
5070 (JSArray::kSize + | 5074 (JSArray::kSize + |
5071 FixedArray::SizeFor(JSObject::kInitialMaxFastElementArray) + | 5075 FixedArray::SizeFor(JSObject::kInitialMaxFastElementArray) + |
(...skipping 1236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6308 static_cast<int>(object_sizes_last_time_[index])); | 6312 static_cast<int>(object_sizes_last_time_[index])); |
6309 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) | 6313 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) |
6310 #undef ADJUST_LAST_TIME_OBJECT_COUNT | 6314 #undef ADJUST_LAST_TIME_OBJECT_COUNT |
6311 | 6315 |
6312 MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); | 6316 MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); |
6313 MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); | 6317 MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); |
6314 ClearObjectStats(); | 6318 ClearObjectStats(); |
6315 } | 6319 } |
6316 } | 6320 } |
6317 } // namespace v8::internal | 6321 } // namespace v8::internal |
OLD | NEW |