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

Side by Side Diff: src/heap.cc

Issue 334913004: Support external startup data in V8. (retry) (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: rebase + style fix Created 6 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « src/flag-definitions.h ('k') | src/mksnapshot.cc » ('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/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/once.h" 9 #include "src/base/once.h"
10 #include "src/bootstrapper.h" 10 #include "src/bootstrapper.h"
(...skipping 4869 matching lines...) Expand 10 before | Expand all | Expand 10 after
4880 } 4880 }
4881 if (FLAG_max_executable_size > 0) { 4881 if (FLAG_max_executable_size > 0) {
4882 max_executable_size_ = FLAG_max_executable_size * MB; 4882 max_executable_size_ = FLAG_max_executable_size * MB;
4883 } 4883 }
4884 4884
4885 if (FLAG_stress_compaction) { 4885 if (FLAG_stress_compaction) {
4886 // This will cause more frequent GCs when stressing. 4886 // This will cause more frequent GCs when stressing.
4887 max_semi_space_size_ = Page::kPageSize; 4887 max_semi_space_size_ = Page::kPageSize;
4888 } 4888 }
4889 4889
4890 if (Snapshot::IsEnabled()) { 4890 if (Snapshot::HaveASnapshotToStartFrom()) {
4891 // If we are using a snapshot we always reserve the default amount 4891 // If we are using a snapshot we always reserve the default amount
4892 // of memory for each semispace because code in the snapshot has 4892 // of memory for each semispace because code in the snapshot has
4893 // write-barrier code that relies on the size and alignment of new 4893 // write-barrier code that relies on the size and alignment of new
4894 // space. We therefore cannot use a larger max semispace size 4894 // space. We therefore cannot use a larger max semispace size
4895 // than the default reserved semispace size. 4895 // than the default reserved semispace size.
4896 if (max_semi_space_size_ > reserved_semispace_size_) { 4896 if (max_semi_space_size_ > reserved_semispace_size_) {
4897 max_semi_space_size_ = reserved_semispace_size_; 4897 max_semi_space_size_ = reserved_semispace_size_;
4898 if (FLAG_trace_gc) { 4898 if (FLAG_trace_gc) {
4899 PrintPID("Max semi-space size cannot be more than %d kbytes\n", 4899 PrintPID("Max semi-space size cannot be more than %d kbytes\n",
4900 reserved_semispace_size_ >> 10); 4900 reserved_semispace_size_ >> 10);
(...skipping 1456 matching lines...) Expand 10 before | Expand all | Expand 10 after
6357 static_cast<int>(object_sizes_last_time_[index])); 6357 static_cast<int>(object_sizes_last_time_[index]));
6358 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) 6358 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT)
6359 #undef ADJUST_LAST_TIME_OBJECT_COUNT 6359 #undef ADJUST_LAST_TIME_OBJECT_COUNT
6360 6360
6361 MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); 6361 MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_));
6362 MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); 6362 MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_));
6363 ClearObjectStats(); 6363 ClearObjectStats();
6364 } 6364 }
6365 6365
6366 } } // namespace v8::internal 6366 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/flag-definitions.h ('k') | src/mksnapshot.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698