[heap] Remove max_executable_size resource constraint.
BUG=chromium:716032 Review-Url: https://codereview.chromium.org/2890603007 Cr-Commit-Position: refs/heads/master@{#45400}
This commit is contained in:
parent
0439100a5f
commit
a9e56f4f36
@ -5905,8 +5905,12 @@ class V8_EXPORT ResourceConstraints {
|
||||
void set_max_old_space_size(int limit_in_mb) {
|
||||
max_old_space_size_ = limit_in_mb;
|
||||
}
|
||||
int max_executable_size() const { return max_executable_size_; }
|
||||
void set_max_executable_size(int limit_in_mb) {
|
||||
V8_DEPRECATE_SOON("max_executable_size_ is subsumed by max_old_space_size_",
|
||||
int max_executable_size() const) {
|
||||
return max_executable_size_;
|
||||
}
|
||||
V8_DEPRECATE_SOON("max_executable_size_ is subsumed by max_old_space_size_",
|
||||
void set_max_executable_size(int limit_in_mb)) {
|
||||
max_executable_size_ = limit_in_mb;
|
||||
}
|
||||
uint32_t* stack_limit() const { return stack_limit_; }
|
||||
|
@ -813,7 +813,6 @@ Extension::Extension(const char* name,
|
||||
ResourceConstraints::ResourceConstraints()
|
||||
: max_semi_space_size_(0),
|
||||
max_old_space_size_(0),
|
||||
max_executable_size_(0),
|
||||
stack_limit_(NULL),
|
||||
code_range_size_(0),
|
||||
max_zone_pool_size_(0) {}
|
||||
@ -835,24 +834,20 @@ void ResourceConstraints::ConfigureDefaults(uint64_t physical_memory,
|
||||
if (physical_memory <= low_limit) {
|
||||
set_max_semi_space_size(i::Heap::kMaxSemiSpaceSizeLowMemoryDevice);
|
||||
set_max_old_space_size(i::Heap::kMaxOldSpaceSizeLowMemoryDevice);
|
||||
set_max_executable_size(i::Heap::kMaxExecutableSizeLowMemoryDevice);
|
||||
set_max_zone_pool_size(i::AccountingAllocator::kMaxPoolSizeLowMemoryDevice);
|
||||
} else if (physical_memory <= medium_limit) {
|
||||
set_max_semi_space_size(i::Heap::kMaxSemiSpaceSizeMediumMemoryDevice);
|
||||
set_max_old_space_size(i::Heap::kMaxOldSpaceSizeMediumMemoryDevice);
|
||||
set_max_executable_size(i::Heap::kMaxExecutableSizeMediumMemoryDevice);
|
||||
set_max_zone_pool_size(
|
||||
i::AccountingAllocator::kMaxPoolSizeMediumMemoryDevice);
|
||||
} else if (physical_memory <= high_limit) {
|
||||
set_max_semi_space_size(i::Heap::kMaxSemiSpaceSizeHighMemoryDevice);
|
||||
set_max_old_space_size(i::Heap::kMaxOldSpaceSizeHighMemoryDevice);
|
||||
set_max_executable_size(i::Heap::kMaxExecutableSizeHighMemoryDevice);
|
||||
set_max_zone_pool_size(
|
||||
i::AccountingAllocator::kMaxPoolSizeHighMemoryDevice);
|
||||
} else {
|
||||
set_max_semi_space_size(i::Heap::kMaxSemiSpaceSizeHugeMemoryDevice);
|
||||
set_max_old_space_size(i::Heap::kMaxOldSpaceSizeHugeMemoryDevice);
|
||||
set_max_executable_size(i::Heap::kMaxExecutableSizeHugeMemoryDevice);
|
||||
set_max_zone_pool_size(
|
||||
i::AccountingAllocator::kMaxPoolSizeHugeMemoryDevice);
|
||||
}
|
||||
@ -871,11 +866,9 @@ void SetResourceConstraints(i::Isolate* isolate,
|
||||
const ResourceConstraints& constraints) {
|
||||
int semi_space_size = constraints.max_semi_space_size();
|
||||
int old_space_size = constraints.max_old_space_size();
|
||||
int max_executable_size = constraints.max_executable_size();
|
||||
size_t code_range_size = constraints.code_range_size();
|
||||
size_t max_pool_size = constraints.max_zone_pool_size();
|
||||
if (semi_space_size != 0 || old_space_size != 0 ||
|
||||
max_executable_size != 0 || code_range_size != 0) {
|
||||
if (semi_space_size != 0 || old_space_size != 0 || code_range_size != 0) {
|
||||
isolate->heap()->ConfigureHeap(semi_space_size, old_space_size,
|
||||
code_range_size);
|
||||
}
|
||||
|
@ -634,7 +634,6 @@ DEFINE_BOOL(experimental_new_space_growth_heuristic, false,
|
||||
"of their absolute value.")
|
||||
DEFINE_INT(max_old_space_size, 0, "max size of the old space (in Mbytes)")
|
||||
DEFINE_INT(initial_old_space_size, 0, "initial old space size (in Mbytes)")
|
||||
DEFINE_INT(max_executable_size, 0, "max size of executable memory (in Mbytes)")
|
||||
DEFINE_BOOL(gc_global, false, "always perform global GCs")
|
||||
DEFINE_INT(gc_interval, -1, "garbage collect after <n> allocations")
|
||||
DEFINE_INT(retain_maps_for_n_gc, 2,
|
||||
|
@ -627,16 +627,6 @@ class Heap {
|
||||
static const int kMaxOldSpaceSizeHighMemoryDevice = 512 * kPointerMultiplier;
|
||||
static const int kMaxOldSpaceSizeHugeMemoryDevice = 1024 * kPointerMultiplier;
|
||||
|
||||
// The executable size has to be a multiple of Page::kPageSize.
|
||||
// Sizes are in MB.
|
||||
static const int kMaxExecutableSizeLowMemoryDevice = 96 * kPointerMultiplier;
|
||||
static const int kMaxExecutableSizeMediumMemoryDevice =
|
||||
192 * kPointerMultiplier;
|
||||
static const int kMaxExecutableSizeHighMemoryDevice =
|
||||
256 * kPointerMultiplier;
|
||||
static const int kMaxExecutableSizeHugeMemoryDevice =
|
||||
256 * kPointerMultiplier;
|
||||
|
||||
static const int kTraceRingBufferSize = 512;
|
||||
static const int kStacktraceBufferSize = 512;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user