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

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

Issue 721573003: Increase the target new space size to the max new space size (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | 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/v8.h" 5 #include "src/v8.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 5022 matching lines...) Expand 10 before | Expand all | Expand 10 after
5033 target_semispace_size_ = max_semi_space_size_; 5033 target_semispace_size_ = max_semi_space_size_;
5034 if (FLAG_trace_gc) { 5034 if (FLAG_trace_gc) {
5035 PrintPID( 5035 PrintPID(
5036 "Target semi-space size cannot be less than the maximum " 5036 "Target semi-space size cannot be less than the maximum "
5037 "semi-space size of %d MB\n", 5037 "semi-space size of %d MB\n",
5038 max_semi_space_size_ / MB); 5038 max_semi_space_size_ / MB);
5039 } 5039 }
5040 } else { 5040 } else {
5041 target_semispace_size_ = target_semispace_size; 5041 target_semispace_size_ = target_semispace_size;
5042 } 5042 }
5043 } else {
5044 target_semispace_size_ = max_semi_space_size_;
5043 } 5045 }
5044 5046
5045 target_semispace_size_ = Max(initial_semispace_size_, target_semispace_size_);
5046 5047
5047 // The old generation is paged and needs at least one page for each space. 5048 // The old generation is paged and needs at least one page for each space.
5048 int paged_space_count = LAST_PAGED_SPACE - FIRST_PAGED_SPACE + 1; 5049 int paged_space_count = LAST_PAGED_SPACE - FIRST_PAGED_SPACE + 1;
5049 max_old_generation_size_ = 5050 max_old_generation_size_ =
5050 Max(static_cast<intptr_t>(paged_space_count * Page::kPageSize), 5051 Max(static_cast<intptr_t>(paged_space_count * Page::kPageSize),
5051 max_old_generation_size_); 5052 max_old_generation_size_);
5052 5053
5053 // We rely on being able to allocate new arrays in paged spaces. 5054 // We rely on being able to allocate new arrays in paged spaces.
5054 DCHECK(Page::kMaxRegularHeapObjectSize >= 5055 DCHECK(Page::kMaxRegularHeapObjectSize >=
5055 (JSArray::kSize + 5056 (JSArray::kSize +
(...skipping 1237 matching lines...) Expand 10 before | Expand all | Expand 10 after
6293 static_cast<int>(object_sizes_last_time_[index])); 6294 static_cast<int>(object_sizes_last_time_[index]));
6294 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) 6295 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT)
6295 #undef ADJUST_LAST_TIME_OBJECT_COUNT 6296 #undef ADJUST_LAST_TIME_OBJECT_COUNT
6296 6297
6297 MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); 6298 MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_));
6298 MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); 6299 MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_));
6299 ClearObjectStats(); 6300 ClearObjectStats();
6300 } 6301 }
6301 } 6302 }
6302 } // namespace v8::internal 6303 } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698