V8Script |
This property is specified in bytes. When it is set to the default value, heap size monitoring is disabled, and scripts with memory leaks or excessive memory usage can cause unrecoverable errors and process termination.
A V8 runtime unconditionally terminates the process when it exceeds its resource constraints (see V8RuntimeConstraints). This property enables external heap size monitoring that can prevent termination in some scenarios. To be effective, it should be set to a value that is significantly lower than MaxOldSpaceSize. Note that enabling heap size monitoring results in slower script execution.
Exceeding this limit causes the V8 runtime to behave in accordance with RuntimeHeapSizeViolationPolicy.
Note that ArrayBuffer memory is allocated outside the runtime's heap and is therefore not tracked by heap size monitoring. See MaxArrayBufferAllocation for additional information.