@@ -3410,12 +3410,24 @@ added: v8.2.0
34103410#### ` buffer.constants.MAX_LENGTH `
34113411<!-- YAML
34123412added: v8.2.0
3413+ changes:
3414+ - version: v15.0.0
3415+ pr-url: https://github.com/nodejs/node/pull/35415
3416+ description: Value is changed to 2<sup>32</sup> on 64-bit
3417+ architectures.
3418+ - version: v14.0.0
3419+ pr-url: https://github.com/nodejs/node/pull/32116
3420+ description: Value is changed from 2<sup>31</sup> - 1 to
3421+ 2<sup>32</sup> - 1 on 64-bit architectures.
34133422-->
34143423
34153424* {integer} The largest size allowed for a single ` Buffer ` instance.
34163425
34173426On 32-bit architectures, this value currently is 2<sup >30</sup > - 1 (~ 1GB).
3418- On 64-bit architectures, this value currently is 2<sup >31</sup > - 1 (~ 2GB).
3427+
3428+ On 64-bit architectures, this value currently is 2<sup >32</sup > (~ 4GB).
3429+
3430+ It reflects [ ` v8::TypedArray::kMaxLength ` ] [ ] under the hood.
34193431
34203432This value is also available as [ ` buffer.kMaxLength ` ] [ ] .
34213433
@@ -3585,6 +3597,7 @@ introducing security vulnerabilities into an application.
35853597[ `buffer.constants.MAX_STRING_LENGTH` ] : #buffer_buffer_constants_max_string_length
35863598[ `buffer.kMaxLength` ] : #buffer_buffer_kmaxlength
35873599[ `util.inspect()` ] : util.md#util_util_inspect_object_options
3600+ [ `v8::TypedArray::kMaxLength` ] : https://v8.github.io/api/head/classv8_1_1TypedArray.html#a54a48f4373da0850663c4393d843b9b0
35883601[ base64url ] : https://tools.ietf.org/html/rfc4648#section-5
35893602[ binary strings ] : https://developer.mozilla.org/en-US/docs/Web/API/DOMString/Binary
35903603[ endianness ] : https://en.wikipedia.org/wiki/Endianness
0 commit comments