Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(76)

Side by Side Diff: src/heap/heap.cc

Issue 1393833002: [heap] Reland prepare code for smaller large object allocation limit than max allocatable memory. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/full-codegen/full-codegen.cc ('k') | src/heap/spaces.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « src/full-codegen/full-codegen.cc ('k') | src/heap/spaces.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698