Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit cd30dbb

Browse filesBrowse files
Trottcodebytere
authored andcommitted
doc: revise --zero-fill-buffers text in buffer.md
There was an unclear sentence fragment that needed fixing, so I edited the entire paragraph for clarity. I also removed irrelevant information about behavior before Node.js 8.0.0. That version of Node.js is no longer supported and these docs will never apply to 8.0.0. (At the time of this writing, 10.x is the oldest supported line, and so changes to the docs will never be backported farther than the 10.x docs.) PR-URL: #32019 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
1 parent 49864d1 commit cd30dbb
Copy full SHA for cd30dbb

File tree

Expand file treeCollapse file tree

1 file changed

+6
-9
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+6
-9
lines changed
Open diff view settings
Collapse file

‎doc/api/buffer.md‎

Copy file name to clipboardExpand all lines: doc/api/buffer.md
+6-9Lines changed: 6 additions & 9 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -123,15 +123,12 @@ added: v5.10.0
123123
-->
124124

125125
Node.js can be started using the `--zero-fill-buffers` command line option to
126-
cause all newly allocated `Buffer` instances to be zero-filled upon creation by
127-
default. Before Node.js 8.0.0, this included buffers allocated by `new
128-
Buffer(size)`. Since Node.js 8.0.0, buffers allocated with `new` are always
129-
zero-filled, whether this option is used or not.
130-
[`Buffer.allocUnsafe()`][], [`Buffer.allocUnsafeSlow()`][], and `new
131-
SlowBuffer(size)`. Use of this flag can have a significant negative impact on
132-
performance. Use of the `--zero-fill-buffers` option is recommended only when
133-
necessary to enforce that newly allocated `Buffer` instances cannot contain old
134-
data that is potentially sensitive.
126+
cause all newly-allocated `Buffer` instances to be zero-filled upon creation by
127+
default. Without the option, buffers created with [`Buffer.allocUnsafe()`][],
128+
[`Buffer.allocUnsafeSlow()`][], and `new SlowBuffer(size)` are not zero-filled.
129+
Use of this flag can have a significant negative impact on performance. Use the
130+
`--zero-fill-buffers` option only when necessary to enforce that newly allocated
131+
`Buffer` instances cannot contain old data that is potentially sensitive.
135132

136133
```console
137134
$ node --zero-fill-buffers

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.