Skip to content

Commit 7555dee

Browse files
Trotttargos
authored andcommitted
doc: improve zero-fill-buffers text
* improve text for easier comprehension * clarify that performance impact is *negative* * remove superfluous "either" (should only be used when there are 2 options anyway) * remove superfluous italics * line wrap at 80 chars PR-URL: #19623 Reviewed-By: Shingo Inoue <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Vse Mozhet Byt <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: Tiancheng "Timothy" Gu <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Сковорода Никита Андреевич <[email protected]>
1 parent 274eff5 commit 7555dee

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

doc/api/buffer.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -111,13 +111,13 @@ added: v5.10.0
111111
-->
112112

113113
Node.js can be started using the `--zero-fill-buffers` command line option to
114-
force all newly allocated `Buffer` instances created using either
115-
`new Buffer(size)`, [`Buffer.allocUnsafe()`], [`Buffer.allocUnsafeSlow()`] or
116-
`new SlowBuffer(size)` to be *automatically zero-filled* upon creation. Use of
117-
this flag *changes the default behavior* of these methods and *can have a significant
118-
impact* on performance. Use of the `--zero-fill-buffers` option is recommended
119-
only when necessary to enforce that newly allocated `Buffer` instances cannot
120-
contain old data that is potentially sensitive.
114+
cause all newly allocated `Buffer` instances to be zero-filled upon creation by
115+
default, including buffers returned by `new Buffer(size)`,
116+
[`Buffer.allocUnsafe()`], [`Buffer.allocUnsafeSlow()`], and `new
117+
SlowBuffer(size)`. Use of this flag can have a significant negative impact on
118+
performance. Use of the `--zero-fill-buffers` option is recommended only when
119+
necessary to enforce that newly allocated `Buffer` instances cannot contain old
120+
data that is potentially sensitive.
121121

122122
```txt
123123
$ node --zero-fill-buffers

0 commit comments

Comments
 (0)