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

Side by Side Diff: src/heap.cc

Issue 291653005: Increase external allocation limit. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 7 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 | « 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 "v8.h" 5 #include "v8.h"
6 6
7 #include "accessors.h" 7 #include "accessors.h"
8 #include "api.h" 8 #include "api.h"
9 #include "bootstrapper.h" 9 #include "bootstrapper.h"
10 #include "codegen.h" 10 #include "codegen.h"
(...skipping 5034 matching lines...) Expand 10 before | Expand all | Expand 10 after
5045 "semi-space size of %d MB\n", max_semi_space_size_); 5045 "semi-space size of %d MB\n", max_semi_space_size_);
5046 } 5046 }
5047 } else { 5047 } else {
5048 initial_semispace_size_ = initial_semispace_size; 5048 initial_semispace_size_ = initial_semispace_size;
5049 } 5049 }
5050 } 5050 }
5051 5051
5052 initial_semispace_size_ = Min(initial_semispace_size_, max_semi_space_size_); 5052 initial_semispace_size_ = Min(initial_semispace_size_, max_semi_space_size_);
5053 5053
5054 // The external allocation limit should be below 256 MB on all architectures 5054 // The external allocation limit should be below 256 MB on all architectures
5055 // to avoid unnecessary low memory notifications, as that is the threshold 5055 // to avoid that resource-constrained embedders run low on memory.
5056 // for some embedders. 5056 external_allocation_limit_ = 256 * MB;
5057 external_allocation_limit_ = 12 * max_semi_space_size_;
5058 ASSERT(external_allocation_limit_ <= 256 * MB); 5057 ASSERT(external_allocation_limit_ <= 256 * MB);
5059 5058
5060 // The old generation is paged and needs at least one page for each space. 5059 // The old generation is paged and needs at least one page for each space.
5061 int paged_space_count = LAST_PAGED_SPACE - FIRST_PAGED_SPACE + 1; 5060 int paged_space_count = LAST_PAGED_SPACE - FIRST_PAGED_SPACE + 1;
5062 max_old_generation_size_ = 5061 max_old_generation_size_ =
5063 Max(static_cast<intptr_t>(paged_space_count * Page::kPageSize), 5062 Max(static_cast<intptr_t>(paged_space_count * Page::kPageSize),
5064 max_old_generation_size_); 5063 max_old_generation_size_);
5065 5064
5066 // We rely on being able to allocate new arrays in paged spaces. 5065 // We rely on being able to allocate new arrays in paged spaces.
5067 ASSERT(Page::kMaxRegularHeapObjectSize >= 5066 ASSERT(Page::kMaxRegularHeapObjectSize >=
(...skipping 1415 matching lines...) Expand 10 before | Expand all | Expand 10 after
6483 static_cast<int>(object_sizes_last_time_[index])); 6482 static_cast<int>(object_sizes_last_time_[index]));
6484 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) 6483 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT)
6485 #undef ADJUST_LAST_TIME_OBJECT_COUNT 6484 #undef ADJUST_LAST_TIME_OBJECT_COUNT
6486 6485
6487 OS::MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); 6486 OS::MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_));
6488 OS::MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); 6487 OS::MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_));
6489 ClearObjectStats(); 6488 ClearObjectStats();
6490 } 6489 }
6491 6490
6492 } } // namespace v8::internal 6491 } } // 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