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

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
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 4665 matching lines...) Expand 10 before | Expand all | Expand 10 after
4676 initial_old_generation_size_ = FLAG_initial_old_space_size * MB; 4676 initial_old_generation_size_ = FLAG_initial_old_space_size * MB;
4677 } else { 4677 } else {
4678 initial_old_generation_size_ = 4678 initial_old_generation_size_ =
4679 max_old_generation_size_ / kInitalOldGenerationLimitFactor; 4679 max_old_generation_size_ / kInitalOldGenerationLimitFactor;
4680 } 4680 }
4681 old_generation_allocation_limit_ = initial_old_generation_size_; 4681 old_generation_allocation_limit_ = initial_old_generation_size_;
4682 4682
4683 // We rely on being able to allocate new arrays in paged spaces. 4683 // We rely on being able to allocate new arrays in paged spaces.
4684 DCHECK(Page::kMaxRegularHeapObjectSize >= 4684 DCHECK(Page::kMaxRegularHeapObjectSize >=
4685 (JSArray::kSize + 4685 (JSArray::kSize +
4686 FixedArray::SizeFor(JSObject::kInitialMaxFastElementArray) + 4686 FixedArray::SizeFor(JSArray::kInitialMaxFastElementArray) +
4687 AllocationMemento::kSize)); 4687 AllocationMemento::kSize));
4688 4688
4689 code_range_size_ = code_range_size * MB; 4689 code_range_size_ = code_range_size * MB;
4690 4690
4691 configured_ = true; 4691 configured_ = true;
4692 return true; 4692 return true;
4693 } 4693 }
4694 4694
4695 4695
4696 void Heap::AddToRingBuffer(const char* string) { 4696 void Heap::AddToRingBuffer(const char* string) {
(...skipping 1388 matching lines...) Expand 10 before | Expand all | Expand 10 after
6085 } 6085 }
6086 6086
6087 6087
6088 // static 6088 // static
6089 int Heap::GetStaticVisitorIdForMap(Map* map) { 6089 int Heap::GetStaticVisitorIdForMap(Map* map) {
6090 return StaticVisitorBase::GetVisitorId(map); 6090 return StaticVisitorBase::GetVisitorId(map);
6091 } 6091 }
6092 6092
6093 } // namespace internal 6093 } // namespace internal
6094 } // namespace v8 6094 } // namespace v8
OLDNEW
« no previous file with comments | « src/full-codegen/full-codegen.cc ('k') | src/heap/spaces.h » ('j') | test/cctest/test-api.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698