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 6728 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6739 external_allocation_limit_ = 12 * max_semispace_size_; | 6739 external_allocation_limit_ = 12 * max_semispace_size_; |
6740 ASSERT(external_allocation_limit_ <= 256 * MB); | 6740 ASSERT(external_allocation_limit_ <= 256 * MB); |
6741 | 6741 |
6742 // The old generation is paged and needs at least one page for each space. | 6742 // The old generation is paged and needs at least one page for each space. |
6743 int paged_space_count = LAST_PAGED_SPACE - FIRST_PAGED_SPACE + 1; | 6743 int paged_space_count = LAST_PAGED_SPACE - FIRST_PAGED_SPACE + 1; |
6744 max_old_generation_size_ = Max(static_cast<intptr_t>(paged_space_count * | 6744 max_old_generation_size_ = Max(static_cast<intptr_t>(paged_space_count * |
6745 Page::kPageSize), | 6745 Page::kPageSize), |
6746 RoundUp(max_old_generation_size_, | 6746 RoundUp(max_old_generation_size_, |
6747 Page::kPageSize)); | 6747 Page::kPageSize)); |
6748 | 6748 |
| 6749 // We rely on being able to allocate new arrays in paged spaces. |
| 6750 ASSERT(MaxRegularSpaceAllocationSize() >= |
| 6751 (JSArray::kSize + |
| 6752 FixedArray::SizeFor(JSObject::kInitialMaxFastElementArray) + |
| 6753 AllocationMemento::kSize)); |
| 6754 |
6749 configured_ = true; | 6755 configured_ = true; |
6750 return true; | 6756 return true; |
6751 } | 6757 } |
6752 | 6758 |
6753 | 6759 |
6754 bool Heap::ConfigureHeapDefault() { | 6760 bool Heap::ConfigureHeapDefault() { |
6755 return ConfigureHeap(static_cast<intptr_t>(FLAG_max_new_space_size / 2) * KB, | 6761 return ConfigureHeap(static_cast<intptr_t>(FLAG_max_new_space_size / 2) * KB, |
6756 static_cast<intptr_t>(FLAG_max_old_space_size) * MB, | 6762 static_cast<intptr_t>(FLAG_max_old_space_size) * MB, |
6757 static_cast<intptr_t>(FLAG_max_executable_size) * MB); | 6763 static_cast<intptr_t>(FLAG_max_executable_size) * MB); |
6758 } | 6764 } |
(...skipping 1324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8083 if (FLAG_concurrent_recompilation) { | 8089 if (FLAG_concurrent_recompilation) { |
8084 heap_->relocation_mutex_->Lock(); | 8090 heap_->relocation_mutex_->Lock(); |
8085 #ifdef DEBUG | 8091 #ifdef DEBUG |
8086 heap_->relocation_mutex_locked_by_optimizer_thread_ = | 8092 heap_->relocation_mutex_locked_by_optimizer_thread_ = |
8087 heap_->isolate()->optimizing_compiler_thread()->IsOptimizerThread(); | 8093 heap_->isolate()->optimizing_compiler_thread()->IsOptimizerThread(); |
8088 #endif // DEBUG | 8094 #endif // DEBUG |
8089 } | 8095 } |
8090 } | 8096 } |
8091 | 8097 |
8092 } } // namespace v8::internal | 8098 } } // namespace v8::internal |
OLD | NEW |