buffer.constants.MAX_LENGTH


  • <integer> 单个 Buffer 实例允许的最大大小。

在 32 位架构上,此值目前是 230 - 1 (~1GB)。

在 64 位架构上,此值目前是 232 - 1 (~4GB)。

它反映了引擎盖下的 v8::TypedArray::kMaxLength

此值也可用作 buffer.kMaxLength

  • <integer> The largest size allowed for a single Buffer instance.

On 32-bit architectures, this value currently is 230 - 1 (~1GB).

On 64-bit architectures, this value currently is 232 - 1 (~4GB).

It reflects v8::TypedArray::kMaxLength under the hood.

This value is also available as buffer.kMaxLength.