OLD | NEW |
---|---|
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 5775 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
5786 // generation size. | 5786 // generation size. |
5787 if (max_executable_size_ > max_old_generation_size_) { | 5787 if (max_executable_size_ > max_old_generation_size_) { |
5788 max_executable_size_ = max_old_generation_size_; | 5788 max_executable_size_ = max_old_generation_size_; |
5789 } | 5789 } |
5790 | 5790 |
5791 // The new space size must be a power of two to support single-bit testing | 5791 // The new space size must be a power of two to support single-bit testing |
5792 // for containment. | 5792 // for containment. |
5793 max_semispace_size_ = RoundUpToPowerOf2(max_semispace_size_); | 5793 max_semispace_size_ = RoundUpToPowerOf2(max_semispace_size_); |
5794 reserved_semispace_size_ = RoundUpToPowerOf2(reserved_semispace_size_); | 5794 reserved_semispace_size_ = RoundUpToPowerOf2(reserved_semispace_size_); |
5795 initial_semispace_size_ = Min(initial_semispace_size_, max_semispace_size_); | 5795 initial_semispace_size_ = Min(initial_semispace_size_, max_semispace_size_); |
5796 external_allocation_limit_ = 10 * max_semispace_size_; | 5796 external_allocation_limit_ = 16 * max_semispace_size_; |
ulan
2012/08/06 13:01:58
The current limit is 80MB for desktop and 40MB for
| |
5797 | 5797 |
5798 // The old generation is paged and needs at least one page for each space. | 5798 // The old generation is paged and needs at least one page for each space. |
5799 int paged_space_count = LAST_PAGED_SPACE - FIRST_PAGED_SPACE + 1; | 5799 int paged_space_count = LAST_PAGED_SPACE - FIRST_PAGED_SPACE + 1; |
5800 max_old_generation_size_ = Max(static_cast<intptr_t>(paged_space_count * | 5800 max_old_generation_size_ = Max(static_cast<intptr_t>(paged_space_count * |
5801 Page::kPageSize), | 5801 Page::kPageSize), |
5802 RoundUp(max_old_generation_size_, | 5802 RoundUp(max_old_generation_size_, |
5803 Page::kPageSize)); | 5803 Page::kPageSize)); |
5804 | 5804 |
5805 configured_ = true; | 5805 configured_ = true; |
5806 return true; | 5806 return true; |
(...skipping 1431 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
7238 static_cast<int>(object_sizes_last_time_[index])); | 7238 static_cast<int>(object_sizes_last_time_[index])); |
7239 FIXED_ARRAY_SUB_INSTANCE_TYPE_LIST(ADJUST_LAST_TIME_OBJECT_COUNT) | 7239 FIXED_ARRAY_SUB_INSTANCE_TYPE_LIST(ADJUST_LAST_TIME_OBJECT_COUNT) |
7240 #undef ADJUST_LAST_TIME_OBJECT_COUNT | 7240 #undef ADJUST_LAST_TIME_OBJECT_COUNT |
7241 | 7241 |
7242 memcpy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); | 7242 memcpy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); |
7243 memcpy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); | 7243 memcpy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); |
7244 ClearObjectStats(); | 7244 ClearObjectStats(); |
7245 } | 7245 } |
7246 | 7246 |
7247 } } // namespace v8::internal | 7247 } } // namespace v8::internal |
OLD | NEW |