From 2bd8d99bee5010f01968251d3b157f8bf621fcbb Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Fri, 28 Feb 2020 22:12:47 -0800 Subject: [PATCH] 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: https://github.com/nodejs/node/pull/32019 Reviewed-By: Anna Henningsen Reviewed-By: David Carlier Reviewed-By: Ruben Bridgewater --- doc/api/buffer.md | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/doc/api/buffer.md b/doc/api/buffer.md index 0d7dee9df4528a..ed8da05bc47e7f 100644 --- a/doc/api/buffer.md +++ b/doc/api/buffer.md @@ -123,15 +123,12 @@ added: v5.10.0 --> Node.js can be started using the `--zero-fill-buffers` command line option to -cause all newly allocated `Buffer` instances to be zero-filled upon creation by -default. Before Node.js 8.0.0, this included buffers allocated by `new -Buffer(size)`. Since Node.js 8.0.0, buffers allocated with `new` are always -zero-filled, whether this option is used or not. -[`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. +cause all newly-allocated `Buffer` instances to be zero-filled upon creation by +default. Without the option, buffers created with [`Buffer.allocUnsafe()`][], +[`Buffer.allocUnsafeSlow()`][], and `new SlowBuffer(size)` are not zero-filled. +Use of this flag can have a significant negative impact on performance. Use the +`--zero-fill-buffers` option only when necessary to enforce that newly allocated +`Buffer` instances cannot contain old data that is potentially sensitive. ```console $ node --zero-fill-buffers