| 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/heap/heap.h" | 5 #include "src/heap/heap.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 4665 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4676 initial_old_generation_size_ = FLAG_initial_old_space_size * MB; | 4676 initial_old_generation_size_ = FLAG_initial_old_space_size * MB; |
| 4677 } else { | 4677 } else { |
| 4678 initial_old_generation_size_ = | 4678 initial_old_generation_size_ = |
| 4679 max_old_generation_size_ / kInitalOldGenerationLimitFactor; | 4679 max_old_generation_size_ / kInitalOldGenerationLimitFactor; |
| 4680 } | 4680 } |
| 4681 old_generation_allocation_limit_ = initial_old_generation_size_; | 4681 old_generation_allocation_limit_ = initial_old_generation_size_; |
| 4682 | 4682 |
| 4683 // We rely on being able to allocate new arrays in paged spaces. | 4683 // We rely on being able to allocate new arrays in paged spaces. |
| 4684 DCHECK(Page::kMaxRegularHeapObjectSize >= | 4684 DCHECK(Page::kMaxRegularHeapObjectSize >= |
| 4685 (JSArray::kSize + | 4685 (JSArray::kSize + |
| 4686 FixedArray::SizeFor(JSObject::kInitialMaxFastElementArray) + | 4686 FixedArray::SizeFor(JSArray::kInitialMaxFastElementArray) + |
| 4687 AllocationMemento::kSize)); | 4687 AllocationMemento::kSize)); |
| 4688 | 4688 |
| 4689 code_range_size_ = code_range_size * MB; | 4689 code_range_size_ = code_range_size * MB; |
| 4690 | 4690 |
| 4691 configured_ = true; | 4691 configured_ = true; |
| 4692 return true; | 4692 return true; |
| 4693 } | 4693 } |
| 4694 | 4694 |
| 4695 | 4695 |
| 4696 void Heap::AddToRingBuffer(const char* string) { | 4696 void Heap::AddToRingBuffer(const char* string) { |
| (...skipping 1388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6085 } | 6085 } |
| 6086 | 6086 |
| 6087 | 6087 |
| 6088 // static | 6088 // static |
| 6089 int Heap::GetStaticVisitorIdForMap(Map* map) { | 6089 int Heap::GetStaticVisitorIdForMap(Map* map) { |
| 6090 return StaticVisitorBase::GetVisitorId(map); | 6090 return StaticVisitorBase::GetVisitorId(map); |
| 6091 } | 6091 } |
| 6092 | 6092 |
| 6093 } // namespace internal | 6093 } // namespace internal |
| 6094 } // namespace v8 | 6094 } // namespace v8 |
| OLD | NEW |