File tree 1 file changed +10
-1
lines changed
1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -3140,12 +3140,20 @@ added: v8.2.0
3140
3140
#### ` buffer.constants.MAX_LENGTH `
3141
3141
<!-- YAML
3142
3142
added: v8.2.0
3143
+ changes:
3144
+ - version: v14.0.0
3145
+ pr-url: https://github.com/nodejs/node/pull/32116
3146
+ description: Value is changed from 2<sup>31</sup> - 1 to
3147
+ 2<sup>32</sup> - 1 on 64-bit architectures.
3143
3148
-->
3144
3149
3145
3150
* {integer} The largest size allowed for a single ` Buffer ` instance.
3146
3151
3147
3152
On 32-bit architectures, this value currently is 2<sup >30</sup > - 1 (~ 1GB).
3148
- On 64-bit architectures, this value currently is 2<sup >31</sup > - 1 (~ 2GB).
3153
+
3154
+ On 64-bit architectures, this value currently is 2<sup >32</sup > - 1 (~ 4GB).
3155
+
3156
+ It reflects [ ` v8::TypedArray::kMaxLength ` ] [ ] under the hood.
3149
3157
3150
3158
This value is also available as [ ` buffer.kMaxLength ` ] [ ] .
3151
3159
@@ -3314,6 +3322,7 @@ introducing security vulnerabilities into an application.
3314
3322
[ `buffer.constants.MAX_STRING_LENGTH` ] : #buffer_buffer_constants_max_string_length
3315
3323
[ `buffer.kMaxLength` ] : #buffer_buffer_kmaxlength
3316
3324
[ `util.inspect()` ] : util.md#util_util_inspect_object_options
3325
+ [ `v8::TypedArray::kMaxLength` ] : https://v8.github.io/api/head/classv8_1_1TypedArray.html#a54a48f4373da0850663c4393d843b9b0
3317
3326
[ binary strings ] : https://developer.mozilla.org/en-US/docs/Web/API/DOMString/Binary
3318
3327
[ endianness ] : https://en.wikipedia.org/wiki/Endianness
3319
3328
[ iterator ] : https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols
You can’t perform that action at this time.
0 commit comments