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 4726 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4737 initial_old_generation_size_ = FLAG_initial_old_space_size * MB; | 4737 initial_old_generation_size_ = FLAG_initial_old_space_size * MB; |
4738 } else { | 4738 } else { |
4739 initial_old_generation_size_ = | 4739 initial_old_generation_size_ = |
4740 max_old_generation_size_ / kInitalOldGenerationLimitFactor; | 4740 max_old_generation_size_ / kInitalOldGenerationLimitFactor; |
4741 } | 4741 } |
4742 old_generation_allocation_limit_ = initial_old_generation_size_; | 4742 old_generation_allocation_limit_ = initial_old_generation_size_; |
4743 | 4743 |
4744 // We rely on being able to allocate new arrays in paged spaces. | 4744 // We rely on being able to allocate new arrays in paged spaces. |
4745 DCHECK(Page::kMaxRegularHeapObjectSize >= | 4745 DCHECK(Page::kMaxRegularHeapObjectSize >= |
4746 (JSArray::kSize + | 4746 (JSArray::kSize + |
4747 FixedArray::SizeFor(JSObject::kInitialMaxFastElementArray) + | 4747 FixedArray::SizeFor(JSArray::kInitialMaxFastElementArray) + |
4748 AllocationMemento::kSize)); | 4748 AllocationMemento::kSize)); |
4749 | 4749 |
4750 code_range_size_ = code_range_size * MB; | 4750 code_range_size_ = code_range_size * MB; |
4751 | 4751 |
4752 configured_ = true; | 4752 configured_ = true; |
4753 return true; | 4753 return true; |
4754 } | 4754 } |
4755 | 4755 |
4756 | 4756 |
4757 void Heap::AddToRingBuffer(const char* string) { | 4757 void Heap::AddToRingBuffer(const char* string) { |
(...skipping 1382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6140 } | 6140 } |
6141 | 6141 |
6142 | 6142 |
6143 // static | 6143 // static |
6144 int Heap::GetStaticVisitorIdForMap(Map* map) { | 6144 int Heap::GetStaticVisitorIdForMap(Map* map) { |
6145 return StaticVisitorBase::GetVisitorId(map); | 6145 return StaticVisitorBase::GetVisitorId(map); |
6146 } | 6146 } |
6147 | 6147 |
6148 } // namespace internal | 6148 } // namespace internal |
6149 } // namespace v8 | 6149 } // namespace v8 |
OLD | NEW |