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 <unordered_map> | 7 #include <unordered_map> |
8 #include <unordered_set> | 8 #include <unordered_set> |
9 | 9 |
10 #include "src/accessors.h" | 10 #include "src/accessors.h" |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 external_string_table_(this), | 162 external_string_table_(this), |
163 gc_callbacks_depth_(0), | 163 gc_callbacks_depth_(0), |
164 deserialization_complete_(false), | 164 deserialization_complete_(false), |
165 strong_roots_list_(NULL), | 165 strong_roots_list_(NULL), |
166 heap_iterator_depth_(0), | 166 heap_iterator_depth_(0), |
167 local_embedder_heap_tracer_(nullptr), | 167 local_embedder_heap_tracer_(nullptr), |
168 fast_promotion_mode_(false), | 168 fast_promotion_mode_(false), |
169 force_oom_(false), | 169 force_oom_(false), |
170 delay_sweeper_tasks_for_testing_(false), | 170 delay_sweeper_tasks_for_testing_(false), |
171 pending_layout_change_object_(nullptr) { | 171 pending_layout_change_object_(nullptr) { |
172 // Allow build-time customization of the max semispace size. Building | |
173 // V8 with snapshots and a non-default max semispace size is much | |
174 // easier if you can define it as part of the build environment. | |
175 #if defined(V8_MAX_SEMISPACE_SIZE) | |
176 max_semi_space_size_ = reserved_semispace_size_ = V8_MAX_SEMISPACE_SIZE; | |
177 #endif | |
178 | |
179 // Ensure old_generation_size_ is a multiple of kPageSize. | 172 // Ensure old_generation_size_ is a multiple of kPageSize. |
180 DCHECK((max_old_generation_size_ & (Page::kPageSize - 1)) == 0); | 173 DCHECK((max_old_generation_size_ & (Page::kPageSize - 1)) == 0); |
181 | 174 |
182 memset(roots_, 0, sizeof(roots_[0]) * kRootListLength); | 175 memset(roots_, 0, sizeof(roots_[0]) * kRootListLength); |
183 set_native_contexts_list(NULL); | 176 set_native_contexts_list(NULL); |
184 set_allocation_sites_list(Smi::kZero); | 177 set_allocation_sites_list(Smi::kZero); |
185 set_encountered_weak_collections(Smi::kZero); | 178 set_encountered_weak_collections(Smi::kZero); |
186 set_encountered_weak_cells(Smi::kZero); | 179 set_encountered_weak_cells(Smi::kZero); |
187 set_encountered_transition_arrays(Smi::kZero); | 180 set_encountered_transition_arrays(Smi::kZero); |
188 // Put a dummy entry in the remembered pages so we can find the list the | 181 // Put a dummy entry in the remembered pages so we can find the list the |
(...skipping 6438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6627 case LO_SPACE: | 6620 case LO_SPACE: |
6628 return "LO_SPACE"; | 6621 return "LO_SPACE"; |
6629 default: | 6622 default: |
6630 UNREACHABLE(); | 6623 UNREACHABLE(); |
6631 } | 6624 } |
6632 return NULL; | 6625 return NULL; |
6633 } | 6626 } |
6634 | 6627 |
6635 } // namespace internal | 6628 } // namespace internal |
6636 } // namespace v8 | 6629 } // namespace v8 |
OLD | NEW |