@@ -103,14 +103,13 @@ use the shared internal memory pool.
103103### The ` --zero-fill-buffers ` command line option
104104
105105Node.js can be started using the ` --zero-fill-buffers ` command line option to
106- force all newly allocated ` Buffer ` and ` SlowBuffer ` instances created using
107- either ` new Buffer(size) ` , ` Buffer.allocUnsafe(size) ` ,
108- ` Buffer.allocUnsafeSlow(size) ` or ` new SlowBuffer(size) ` to be * automatically
109- zero-filled* upon creation. Use of this flag * changes the default behavior* of
110- these methods and * can have a significant impact* on performance. Use of the
111- ` --zero-fill-buffers ` option is recommended only when absolutely necessary to
112- enforce that newly allocated ` Buffer ` instances cannot contain potentially
113- sensitive data.
106+ force all newly allocated ` Buffer ` instances created using either
107+ ` new Buffer(size) ` , ` Buffer.allocUnsafe(size) ` , ` Buffer.allocUnsafeSlow(size) `
108+ or ` new SlowBuffer(size) ` to be * automatically zero-filled* upon creation. Use
109+ of this flag * changes the default behavior* of these methods and * can have a
110+ significant impact* on performance. Use of the ` --zero-fill-buffers ` option is
111+ recommended only when absolutely necessary to enforce that newly allocated
112+ ` Buffer ` instances cannot contain potentially sensitive data.
114113
115114```
116115$ node --zero-fill-buffers
@@ -342,8 +341,8 @@ console.log(buf);
342341Allocates a new ` Buffer ` of ` size ` bytes. The ` size ` must be less than
343342or equal to the value of ` require('buffer').kMaxLength ` (on 64-bit
344343architectures, ` kMaxLength ` is ` (2^31)-1 ` ). Otherwise, a [ ` RangeError ` ] [ ] is
345- thrown. If a ` size ` less than 0 is specified, a zero-length Buffer will be
346- created .
344+ thrown. A zero-length Buffer will be created if a ` size ` less than or equal to
345+ 0 is specified .
347346
348347Unlike ` ArrayBuffers ` , the underlying memory for ` Buffer ` instances created in
349348this way is * not initialized* . The contents of a newly created ` Buffer ` are
@@ -400,8 +399,8 @@ console.log(buf);
400399
401400The ` size ` must be less than or equal to the value of
402401` require('buffer').kMaxLength ` (on 64-bit architectures, ` kMaxLength ` is
403- ` (2^31)-1 ` ). Otherwise, a [ ` RangeError ` ] [ ] is thrown. If a ` size ` less than 0
404- is specified, a zero-length ` Buffer ` will be created .
402+ ` (2^31)-1 ` ). Otherwise, a [ ` RangeError ` ] [ ] is thrown. A zero-length Buffer will
403+ be created if a ` size ` less than or equal to 0 is specified .
405404
406405If ` fill ` is specified, the allocated ` Buffer ` will be initialized by calling
407406` buf.fill(fill) ` . See [ ` buf.fill() ` ] [ ] for more information.
@@ -434,8 +433,8 @@ A `TypeError` will be thrown if `size` is not a number.
434433Allocates a new * non-zero-filled* ` Buffer ` of ` size ` bytes. The ` size ` must
435434be less than or equal to the value of ` require('buffer').kMaxLength ` (on 64-bit
436435architectures, ` kMaxLength ` is ` (2^31)-1 ` ). Otherwise, a [ ` RangeError ` ] [ ] is
437- thrown. If a ` size ` less than 0 is specified, a zero-length ` Buffer ` will be
438- created .
436+ thrown. A zero-length Buffer will be created if a ` size ` less than or equal to
437+ 0 is specified .
439438
440439The underlying memory for ` Buffer ` instances created in this way is * not
441440initialized* . The contents of the newly created ` Buffer ` are unknown and
@@ -476,8 +475,8 @@ additional performance that `Buffer.allocUnsafe(size)` provides.
476475Allocates a new * non-zero-filled* and non-pooled ` Buffer ` of ` size ` bytes. The
477476` size ` must be less than or equal to the value of
478477` require('buffer').kMaxLength ` (on 64-bit architectures, ` kMaxLength ` is
479- ` (2^31)-1 ` ). Otherwise, a [ ` RangeError ` ] [ ] is thrown. If a ` size ` less than 0
480- is specified, a zero-length ` Buffer ` will be created .
478+ ` (2^31)-1 ` ). Otherwise, a [ ` RangeError ` ] [ ] is thrown. A zero-length Buffer will
479+ be created if a ` size ` less than or equal to 0 is specified .
481480
482481The underlying memory for ` Buffer ` instances created in this way is * not
483482initialized* . The contents of the newly created ` Buffer ` are unknown and
@@ -1824,8 +1823,8 @@ has observed undue memory retention in their applications.
18241823Allocates a new ` SlowBuffer ` of ` size ` bytes. The ` size ` must be less than
18251824or equal to the value of ` require('buffer').kMaxLength ` (on 64-bit
18261825architectures, ` kMaxLength ` is ` (2^31)-1 ` ). Otherwise, a [ ` RangeError ` ] [ ] is
1827- thrown. If a ` size ` less than 0 is specified, a zero-length ` SlowBuffer ` will be
1828- created .
1826+ thrown. A zero-length Buffer will be created if a ` size ` less than or equal to
1827+ 0 is specified .
18291828
18301829The underlying memory for ` SlowBuffer ` instances is * not initialized* . The
18311830contents of a newly created ` SlowBuffer ` are unknown and could contain
0 commit comments