diff options
Diffstat (limited to 'deps/v8/src/zone/zone.cc')
-rw-r--r-- | deps/v8/src/zone/zone.cc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/deps/v8/src/zone/zone.cc b/deps/v8/src/zone/zone.cc index de8146de05..470f4c4177 100644 --- a/deps/v8/src/zone/zone.cc +++ b/deps/v8/src/zone/zone.cc @@ -42,7 +42,8 @@ const size_t kASanRedzoneBytes = 0; } // namespace -Zone::Zone(AccountingAllocator* allocator, const char* name) +Zone::Zone(AccountingAllocator* allocator, const char* name, + SegmentSize segment_size) : allocation_size_(0), segment_bytes_allocated_(0), position_(0), @@ -50,7 +51,8 @@ Zone::Zone(AccountingAllocator* allocator, const char* name) allocator_(allocator), segment_head_(nullptr), name_(name), - sealed_(false) { + sealed_(false), + segment_size_(segment_size) { allocator_->ZoneCreation(this); } @@ -148,6 +150,9 @@ Address Zone::NewExpand(size_t size) { V8::FatalProcessOutOfMemory("Zone"); return nullptr; } + if (segment_size_ == SegmentSize::kLarge) { + new_size = kMaximumSegmentSize; + } if (new_size < kMinimumSegmentSize) { new_size = kMinimumSegmentSize; } else if (new_size > kMaximumSegmentSize) { |