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

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

Issue 1361853005: [heap] 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 4726 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
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