We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3cbe79c commit a035c85Copy full SHA for a035c85
crates/isolate/src/isolate.rs
@@ -381,6 +381,9 @@ extern "C" fn near_heap_limit_callback(
381
let heap_ctx = unsafe { &mut *(data as *mut HeapContext) };
382
heap_ctx.handle.terminate(TerminationReason::OutOfMemory);
383
384
- // Double heap limit to avoid a hard OOM.
385
- current_heap_limit * 2
+ // Raise the heap limit a lot to avoid a hard OOM.
+ // This is unfortunate but there is some C++ code in V8 that will abort the
386
+ // process if it fails to allocate. We're about to terminate the isolate
387
+ // anyway so any allocation will be very short-lived.
388
+ current_heap_limit * 4
389
}
0 commit comments