Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorAntoine du Hamel <duhamelantoine1995@gmail.com>2022-04-20 01:46:37 +0300
committerMichaƫl Zasso <targos@protonmail.com>2022-04-28 07:56:13 +0300
commit025b3e786a3773eb078beb46a37376a08ecaaf9f (patch)
treeba185ab286daf859e77009a82b3247eba3220e0b /doc
parentd311916f376f9ce07cbd93086db4560b59827259 (diff)
doc: consolidate use of multiple-byte units
Refs: https://en.wikipedia.org/wiki/Byte#Multiple-byte_units PR-URL: https://github.com/nodejs/node/pull/42587 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Paolo Insogna <paolo@cowtech.it> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Mestery <mestery@protonmail.com>
Diffstat (limited to 'doc')
-rw-r--r--doc/api/buffer.md6
-rw-r--r--doc/api/cli.md8
-rw-r--r--doc/api/errors.md4
-rw-r--r--doc/api/fs.md12
-rw-r--r--doc/api/http.md6
-rw-r--r--doc/api/stream.md6
-rw-r--r--doc/api/util.md4
-rw-r--r--doc/contributing/investigating-native-memory-leaks.md2
-rw-r--r--doc/node.12
9 files changed, 25 insertions, 25 deletions
diff --git a/doc/api/buffer.md b/doc/api/buffer.md
index 27201823f57..156db8a8dfd 100644
--- a/doc/api/buffer.md
+++ b/doc/api/buffer.md
@@ -833,7 +833,7 @@ _may contain sensitive data_. Use [`buf.fill(0)`][`buf.fill()`] to initialize
such `Buffer` instances with zeroes.
When using [`Buffer.allocUnsafe()`][] to allocate new `Buffer` instances,
-allocations under 4 KB are sliced from a single pre-allocated `Buffer`. This
+allocations under 4 KiB are sliced from a single pre-allocated `Buffer`. This
allows applications to avoid the garbage collection overhead of creating many
individually allocated `Buffer` instances. This approach improves both
performance and memory usage by eliminating the need to track and clean up as
@@ -5204,9 +5204,9 @@ changes:
* {integer} The largest size allowed for a single `Buffer` instance.
On 32-bit architectures, this value currently is 2<sup>30</sup> - 1 (about 1
-GB).
+GiB).
-On 64-bit architectures, this value currently is 2<sup>32</sup> (about 4 GB).
+On 64-bit architectures, this value currently is 2<sup>32</sup> (about 4 GiB).
It reflects [`v8::TypedArray::kMaxLength`][] under the hood.
diff --git a/doc/api/cli.md b/doc/api/cli.md
index 047ed24697a..74d300e368a 100644
--- a/doc/api/cli.md
+++ b/doc/api/cli.md
@@ -666,10 +666,10 @@ added:
changes:
- version: v13.13.0
pr-url: https://github.com/nodejs/node/pull/32520
- description: Change maximum default size of HTTP headers from 8 KB to 16 KB.
+ description: Change maximum default size of HTTP headers from 8 KiB to 16 KiB.
-->
-Specify the maximum size, in bytes, of HTTP headers. Defaults to 16 KB.
+Specify the maximum size, in bytes, of HTTP headers. Defaults to 16 KiB.
### `--napi-modules`
@@ -1993,8 +1993,8 @@ Sets the max memory size of V8's old memory section. As memory
consumption approaches the limit, V8 will spend more time on
garbage collection in an effort to free unused memory.
-On a machine with 2 GB of memory, consider setting this to
-1536 (1.5 GB) to leave some memory for other uses and avoid swapping.
+On a machine with 2 GiB of memory, consider setting this to
+1536 (1.5 GiB) to leave some memory for other uses and avoid swapping.
```console
$ node --max-old-space-size=1536 index.js
diff --git a/doc/api/errors.md b/doc/api/errors.md
index 71cae6300b2..94afa611608 100644
--- a/doc/api/errors.md
+++ b/doc/api/errors.md
@@ -2951,11 +2951,11 @@ changes:
- v10.15.0
commit: 186035243fad247e3955f
pr-url: https://github.com/nodejs-private/node-private/pull/143
- description: Max header size in `http_parser` was set to 8 KB.
+ description: Max header size in `http_parser` was set to 8 KiB.
-->
Too much HTTP header data was received. In order to protect against malicious or
-malconfigured clients, if more than 8 KB of HTTP header data is received then
+malconfigured clients, if more than 8 KiB of HTTP header data is received then
HTTP parsing will abort without a request or response object being created, and
an `Error` with this code will be emitted.
diff --git a/doc/api/fs.md b/doc/api/fs.md
index 8050cd97b8c..d584d1f20a0 100644
--- a/doc/api/fs.md
+++ b/doc/api/fs.md
@@ -262,8 +262,8 @@ added: v16.11.0
* `highWaterMark` {integer} **Default:** `64 * 1024`
* Returns: {fs.ReadStream}
-Unlike the 16 kb default `highWaterMark` for a {stream.Readable}, the stream
-returned by this method has a default `highWaterMark` of 64 kb.
+Unlike the 16 KiB default `highWaterMark` for a {stream.Readable}, the stream
+returned by this method has a default `highWaterMark` of 64 KiB.
`options` can include `start` and `end` values to read a range of bytes from
the file instead of the entire file. Both `start` and `end` are inclusive and
@@ -2186,8 +2186,8 @@ changes:
* `fs` {Object|null} **Default:** `null`
* Returns: {fs.ReadStream}
-Unlike the 16 kb default `highWaterMark` for a {stream.Readable}, the stream
-returned by this method has a default `highWaterMark` of 64 kb.
+Unlike the 16 KiB default `highWaterMark` for a {stream.Readable}, the stream
+returned by this method has a default `highWaterMark` of 64 KiB.
`options` can include `start` and `end` values to read a range of bytes from
the file instead of the entire file. Both `start` and `end` are inclusive and
@@ -3430,8 +3430,8 @@ to read a complete file into memory.
The additional read overhead can vary broadly on different systems and depends
on the type of file being read. If the file type is not a regular file (a pipe
for instance) and Node.js is unable to determine an actual file size, each read
-operation will load on 64 KB of data. For regular files, each read will process
-512 KB of data.
+operation will load on 64 KiB of data. For regular files, each read will process
+512 KiB of data.
For applications that require as-fast-as-possible reading of file contents, it
is better to use `fs.read()` directly and for application code to manage
diff --git a/doc/api/http.md b/doc/api/http.md
index 81c8f90a1c8..c98eac6e024 100644
--- a/doc/api/http.md
+++ b/doc/api/http.md
@@ -2998,7 +2998,7 @@ changes:
* `maxHeaderSize` {number} Optionally overrides the value of
[`--max-http-header-size`][] for requests received by this server, i.e.
the maximum length of request headers in bytes.
- **Default:** 16384 (16 KB).
+ **Default:** 16384 (16 KiB).
* `noDelay` {boolean} If set to `true`, it disables the use of Nagle's
algorithm immediately after a new incoming connection is received.
**Default:** `true`.
@@ -3154,7 +3154,7 @@ added:
* {number}
Read-only property specifying the maximum allowed size of HTTP headers in bytes.
-Defaults to 16 KB. Configurable using the [`--max-http-header-size`][] CLI
+Defaults to 16 KiB. Configurable using the [`--max-http-header-size`][] CLI
option.
This can be overridden for servers and client requests by passing the
@@ -3231,7 +3231,7 @@ changes:
* `maxHeaderSize` {number} Optionally overrides the value of
[`--max-http-header-size`][] (the maximum length of response headers in
bytes) for responses received from the server.
- **Default:** 16384 (16 KB).
+ **Default:** 16384 (16 KiB).
* `method` {string} A string specifying the HTTP request method. **Default:**
`'GET'`.
* `path` {string} Request path. Should include query string if any.
diff --git a/doc/api/stream.md b/doc/api/stream.md
index a3bca6da604..9ba920f7795 100644
--- a/doc/api/stream.md
+++ b/doc/api/stream.md
@@ -1674,7 +1674,7 @@ If the loop terminates with a `break`, `return`, or a `throw`, the stream will
be destroyed. In other terms, iterating over a stream will consume the stream
fully. The stream will be read in chunks of size equal to the `highWaterMark`
option. In the code example above, data will be in a single chunk if the file
-has less then 64 KB of data because no `highWaterMark` option is provided to
+has less then 64 KiB of data because no `highWaterMark` option is provided to
[`fs.createReadStream()`][].
##### `readable.iterator([options])`
@@ -3047,7 +3047,7 @@ changes:
* `options` {Object}
* `highWaterMark` {number} Buffer level when
[`stream.write()`][stream-write] starts returning `false`. **Default:**
- `16384` (16 KB), or `16` for `objectMode` streams.
+ `16384` (16 KiB), or `16` for `objectMode` streams.
* `decodeStrings` {boolean} Whether to encode `string`s passed to
[`stream.write()`][stream-write] to `Buffer`s (with the encoding
specified in the [`stream.write()`][stream-write] call) before passing
@@ -3420,7 +3420,7 @@ changes:
* `options` {Object}
* `highWaterMark` {number} The maximum [number of bytes][hwm-gotcha] to store
in the internal buffer before ceasing to read from the underlying resource.
- **Default:** `16384` (16 KB), or `16` for `objectMode` streams.
+ **Default:** `16384` (16 KiB), or `16` for `objectMode` streams.
* `encoding` {string} If specified, then buffers will be decoded to
strings using the specified encoding. **Default:** `null`.
* `objectMode` {boolean} Whether this stream should behave
diff --git a/doc/api/util.md b/doc/api/util.md
index 2a8e48fa3ed..e235b8f338e 100644
--- a/doc/api/util.md
+++ b/doc/api/util.md
@@ -536,7 +536,7 @@ changes:
description: The `depth` default changed to `20`.
- version: v11.0.0
pr-url: https://github.com/nodejs/node/pull/22756
- description: The inspection output is now limited to about 128 MB. Data
+ description: The inspection output is now limited to about 128 MiB. Data
above that size will not be fully inspected.
- version: v10.12.0
pr-url: https://github.com/nodejs/node/pull/22788
@@ -778,7 +778,7 @@ console.log(thousand, million, bigNumber, bigDecimal);
```
`util.inspect()` is a synchronous method intended for debugging. Its maximum
-output length is approximately 128 MB. Inputs that result in longer output will
+output length is approximately 128 MiB. Inputs that result in longer output will
be truncated.
### Customizing `util.inspect` colors
diff --git a/doc/contributing/investigating-native-memory-leaks.md b/doc/contributing/investigating-native-memory-leaks.md
index f9345b09273..17389c6bc91 100644
--- a/doc/contributing/investigating-native-memory-leaks.md
+++ b/doc/contributing/investigating-native-memory-leaks.md
@@ -101,7 +101,7 @@ Leaks can be introduced in native addons and the following is a simple
example leak based on the "Hello world" addon from
[node-addon-examples](https://github.com/nodejs/node-addon-examples).
-In this example, a loop which allocates approximately 1 MB of memory and never
+In this example, a loop which allocates approximately 1 MiB of memory and never
frees it has been added:
```cpp
diff --git a/doc/node.1 b/doc/node.1
index f404747dcb8..2003bc8ca79 100644
--- a/doc/node.1
+++ b/doc/node.1
@@ -270,7 +270,7 @@ This flag is inherited from V8 and is subject to change upstream. It may
disappear in a non-semver-major release.
.
.It Fl -max-http-header-size Ns = Ns Ar size
-Specify the maximum size of HTTP headers in bytes. Defaults to 16 KB.
+Specify the maximum size of HTTP headers in bytes. Defaults to 16 KiB.
.
.It Fl -napi-modules
This option is a no-op.