diff options
Diffstat (limited to 'deps/v8/src/zone/accounting-allocator.cc')
-rw-r--r-- | deps/v8/src/zone/accounting-allocator.cc | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/deps/v8/src/zone/accounting-allocator.cc b/deps/v8/src/zone/accounting-allocator.cc index ee841fb4af..8ef141b4c1 100644 --- a/deps/v8/src/zone/accounting-allocator.cc +++ b/deps/v8/src/zone/accounting-allocator.cc @@ -10,6 +10,8 @@ #include <malloc.h> // NOLINT #endif +#include "src/allocation.h" + namespace v8 { namespace internal { @@ -82,11 +84,7 @@ Segment* AccountingAllocator::GetSegment(size_t bytes) { } Segment* AccountingAllocator::AllocateSegment(size_t bytes) { - void* memory = malloc(bytes); - if (memory == nullptr) { - V8::GetCurrentPlatform()->OnCriticalMemoryPressure(); - memory = malloc(bytes); - } + void* memory = AllocWithRetry(bytes); if (memory != nullptr) { base::AtomicWord current = base::Relaxed_AtomicIncrement(¤t_memory_usage_, bytes); |