| 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 4700 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4711 initial_old_generation_size_ = FLAG_initial_old_space_size * MB; | 4711 initial_old_generation_size_ = FLAG_initial_old_space_size * MB; |
| 4712 } else { | 4712 } else { |
| 4713 initial_old_generation_size_ = | 4713 initial_old_generation_size_ = |
| 4714 max_old_generation_size_ / kInitalOldGenerationLimitFactor; | 4714 max_old_generation_size_ / kInitalOldGenerationLimitFactor; |
| 4715 } | 4715 } |
| 4716 old_generation_allocation_limit_ = initial_old_generation_size_; | 4716 old_generation_allocation_limit_ = initial_old_generation_size_; |
| 4717 | 4717 |
| 4718 // We rely on being able to allocate new arrays in paged spaces. | 4718 // We rely on being able to allocate new arrays in paged spaces. |
| 4719 DCHECK(Page::kMaxRegularHeapObjectSize >= | 4719 DCHECK(Page::kMaxRegularHeapObjectSize >= |
| 4720 (JSArray::kSize + | 4720 (JSArray::kSize + |
| 4721 FixedArray::SizeFor(JSObject::kInitialMaxFastElementArray) + | 4721 FixedArray::SizeFor(JSArray::kInitialMaxFastElementArray) + |
| 4722 AllocationMemento::kSize)); | 4722 AllocationMemento::kSize)); |
| 4723 | 4723 |
| 4724 code_range_size_ = code_range_size * MB; | 4724 code_range_size_ = code_range_size * MB; |
| 4725 | 4725 |
| 4726 configured_ = true; | 4726 configured_ = true; |
| 4727 return true; | 4727 return true; |
| 4728 } | 4728 } |
| 4729 | 4729 |
| 4730 | 4730 |
| 4731 void Heap::AddToRingBuffer(const char* string) { | 4731 void Heap::AddToRingBuffer(const char* string) { |
| (...skipping 1382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6114 } | 6114 } |
| 6115 | 6115 |
| 6116 | 6116 |
| 6117 // static | 6117 // static |
| 6118 int Heap::GetStaticVisitorIdForMap(Map* map) { | 6118 int Heap::GetStaticVisitorIdForMap(Map* map) { |
| 6119 return StaticVisitorBase::GetVisitorId(map); | 6119 return StaticVisitorBase::GetVisitorId(map); |
| 6120 } | 6120 } |
| 6121 | 6121 |
| 6122 } // namespace internal | 6122 } // namespace internal |
| 6123 } // namespace v8 | 6123 } // namespace v8 |
| OLD | NEW |