Skip to content

Commit

Permalink
doc: update buffer.constants.MAX_LENGTH size
Browse files Browse the repository at this point in the history
Starting from Node v22.0.0 the `buffer.constants.MAX_LENGTH` has been
increased from 4 GiB to 8 PiB due to V8 engine update to 12.4.254.14.

PR-URL: #54207
Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
  • Loading branch information
samuliasmala authored and targos committed Aug 14, 2024
1 parent 1ba2000 commit 971b9f3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion doc/api/buffer.md
Original file line number Diff line number Diff line change
Expand Up @@ -5361,6 +5361,10 @@ added: v8.2.0
<!-- YAML
added: v8.2.0
changes:
- version: v22.0.0
pr-url: https://github.com/nodejs/node/pull/52465
description: Value is changed to 2<sup>53</sup> - 1 on 64-bit
architectures.
- version: v15.0.0
pr-url: https://github.com/nodejs/node/pull/35415
description: Value is changed to 2<sup>32</sup> on 64-bit
Expand All @@ -5376,7 +5380,7 @@ changes:
On 32-bit architectures, this value currently is 2<sup>30</sup> - 1 (about 1
GiB).

On 64-bit architectures, this value currently is 2<sup>32</sup> (about 4 GiB).
On 64-bit architectures, this value currently is 2<sup>53</sup> - 1 (about 8 PiB).

It reflects [`v8::TypedArray::kMaxLength`][] under the hood.

Expand Down

0 comments on commit 971b9f3

Please sign in to comment.