doc: correct values/references for buffer.kMaxLength · nodejs/node@e3c5dcf

@@ -5356,7 +5356,7 @@ changes:

53565356

- version: v22.0.0

53575357

pr-url: https://github.com/nodejs/node/pull/52465

53585358

description: Value is changed to 2<sup>53</sup> - 1 on 64-bit

5359-

architectures.

5359+

architectures, and 2<sup>31</sup> - 1 on 32-bit architectures.

53605360

- version: v15.0.0

53615361

pr-url: https://github.com/nodejs/node/pull/35415

53625362

description: Value is changed to 2<sup>32</sup> on 64-bit

@@ -5369,12 +5369,13 @@ changes:

5369536953705370

* Type: {integer} The largest size allowed for a single `Buffer` instance.

537153715372-

On 32-bit architectures, this value currently is 2<sup>30</sup> - 1 (about 1

5372+

On 32-bit architectures, this value is equal to 2<sup>31</sup> - 1 (about 2

53735373

GiB).

537453745375-

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

5375+

On 64-bit architectures, this value is equal to [`Number.MAX_SAFE_INTEGER`][]

5376+

(2<sup>53</sup> - 1, about 8 PiB).

537653775377-

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

5378+

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

5378537953795380

This value is also available as [`buffer.kMaxLength`][].

53805381

@@ -5519,6 +5520,7 @@ introducing security vulnerabilities into an application.

55195520

[`ERR_INVALID_BUFFER_SIZE`]: errors.md#err_invalid_buffer_size

55205521

[`ERR_OUT_OF_RANGE`]: errors.md#err_out_of_range

55215522

[`JSON.stringify()`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify

5523+

[`Number.MAX_SAFE_INTEGER`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER

55225524

[`String.prototype.indexOf()`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/indexOf

55235525

[`String.prototype.lastIndexOf()`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/lastIndexOf

55245526

[`String.prototype.length`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/length

@@ -5541,7 +5543,7 @@ introducing security vulnerabilities into an application.

55415543

[`buffer.constants.MAX_STRING_LENGTH`]: #bufferconstantsmax_string_length

55425544

[`buffer.kMaxLength`]: #bufferkmaxlength

55435545

[`util.inspect()`]: util.md#utilinspectobject-options

5544-

[`v8::TypedArray::kMaxLength`]: https://v8.github.io/api/head/classv8_1_1TypedArray.html#a54a48f4373da0850663c4393d843b9b0

5546+

[`v8::Uint8Array::kMaxLength`]: https://v8.github.io/api/head/classv8_1_1Uint8Array.html#a7677e3d0c9c92e4d40bef7212f5980c6

55455547

[base64url]: https://tools.ietf.org/html/rfc4648#section-5

55465548

[endianness]: https://en.wikipedia.org/wiki/Endianness

55475549

[iterator]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols