diff options
author | Rich Trott <rtrott@gmail.com> | 2018-03-26 16:34:35 -0700 |
---|---|---|
committer | Trivikram <16024985+trivikr@users.noreply.github.com> | 2018-03-27 08:21:36 -0700 |
commit | 8eca6b8d3d3e2141180be62b75227f5dd0290a6b (patch) | |
tree | 6cb98ef50812320ccc3a2786e8e94ad110be63d0 /doc/api/buffer.md | |
parent | ed0501f9387585ea2fe8459ba9e0062b48ab4115 (diff) | |
download | android-node-v8-8eca6b8d3d3e2141180be62b75227f5dd0290a6b.tar.gz android-node-v8-8eca6b8d3d3e2141180be62b75227f5dd0290a6b.tar.bz2 android-node-v8-8eca6b8d3d3e2141180be62b75227f5dd0290a6b.zip |
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: https://github.com/nodejs/node/pull/19623
Reviewed-By: Shingo Inoue <leko.noor@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Diffstat (limited to 'doc/api/buffer.md')
-rw-r--r-- | doc/api/buffer.md | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/doc/api/buffer.md b/doc/api/buffer.md index bcde11de66..b551f72ad9 100644 --- a/doc/api/buffer.md +++ b/doc/api/buffer.md @@ -111,13 +111,13 @@ added: v5.10.0 --> Node.js can be started using the `--zero-fill-buffers` command line option to -force all newly allocated `Buffer` instances created using either -`new Buffer(size)`, [`Buffer.allocUnsafe()`], [`Buffer.allocUnsafeSlow()`] or -`new SlowBuffer(size)` to be *automatically zero-filled* upon creation. Use of -this flag *changes the default behavior* of these methods and *can have a significant -impact* on performance. Use of the `--zero-fill-buffers` option is recommended -only when necessary to enforce that newly allocated `Buffer` instances cannot -contain old data that is potentially sensitive. +cause all newly allocated `Buffer` instances to be zero-filled upon creation by +default, including buffers returned by `new Buffer(size)`, +[`Buffer.allocUnsafe()`], [`Buffer.allocUnsafeSlow()`], and `new +SlowBuffer(size)`. Use of this flag can have a significant negative impact on +performance. Use of the `--zero-fill-buffers` option is recommended only when +necessary to enforce that newly allocated `Buffer` instances cannot contain old +data that is potentially sensitive. ```txt $ node --zero-fill-buffers |