doc: use consistent abbreviation formatting

Refs: https://docs.microsoft.com/en-us/style-guide/a-z-word-list-term-collections/term-collections/bits-bytes-terms

PR-URL: https://github.com/nodejs/node/pull/39343
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
This commit is contained in:
Rich Trott committed 2021-07-12 15:21:36 -07:00
1 parent 3fd04e789e
commit 5cccdccf88
8 files changed
+21 -20

No files matched your search

+3 -3
View File
@@ -785,7 +785,7 @@ initialized*. The contents of the newly created `Buffer` are unknown and
such `Buffer` instances with zeroes.
When using [`Buffer.allocUnsafe()`][] to allocate new `Buffer` instances,
allocations under 4KB are sliced from a single pre-allocated `Buffer`. This
allocations under 4 KB 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
@@ -5031,9 +5031,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 (~1GB).
On 32-bit architectures, this value currently is 2<sup>30</sup> - 1 (~1 GB).
On 64-bit architectures, this value currently is 2<sup>32</sup> (~4GB).
On 64-bit architectures, this value currently is 2<sup>32</sup> (~4 GB).
It reflects [`v8::TypedArray::kMaxLength`][] under the hood.
+4 -4
View File
@@ -586,10 +586,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 8KB to 16KB.
description: Change maximum default size of HTTP headers from 8 KB to 16 KB.
-->
Specify the maximum size, in bytes, of HTTP headers. Defaults to 16KB.
Specify the maximum size, in bytes, of HTTP headers. Defaults to 16 KB.
### `--napi-modules`
<!-- YAML
@@ -1760,8 +1760,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 2GB of memory, consider setting this to
1536 (1.5GB) to leave some memory for other uses and avoid swapping.
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.
```console
$ node --max-old-space-size=1536 index.js
+2 -2
View File
@@ -2456,11 +2456,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 8KB.
description: Max header size in `http_parser` was set to 8 KB.
-->
Too much HTTP header data was received. In order to protect against malicious or
malconfigured clients, if more than 8KB of HTTP header data is received then
malconfigured clients, if more than 8 KB 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.
+2 -2
View File
@@ -2966,8 +2966,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 64kb of data. For regular files, each read will process
512kb of data.
operation will load on 64 KB of data. For regular files, each read will process
512 KB 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
+4 -3
View File
@@ -2683,7 +2683,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 (16KB).
**Default:** 16384 (16 KB).
* `requestListener` {Function}
* Returns: {http.Server}
@@ -2793,7 +2793,8 @@ added:
* {number}
Read-only property specifying the maximum allowed size of HTTP headers in bytes.
Defaults to 8KB. Configurable using the [`--max-http-header-size`][] CLI option.
Defaults to 8 KB. Configurable using the [`--max-http-header-size`][] CLI
option.
This can be overridden for servers and client requests by passing the
`maxHeaderSize` option.
@@ -2861,7 +2862,7 @@ changes:
* `maxHeaderSize` {number} Optionally overrides the value of
[`--max-http-header-size`][] for requests received from the server, i.e.
the maximum length of response headers in bytes.
**Default:** 16384 (16KB).
**Default:** 16384 (16 KB).
* `method` {string} A string specifying the HTTP request method. **Default:**
`'GET'`.
* `path` {string} Request path. Should include query string if any.
+3 -3
View File
@@ -1511,7 +1511,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 64KB of data because no `highWaterMark` option is provided to
has less then 64 KB of data because no `highWaterMark` option is provided to
[`fs.createReadStream()`][].
##### `readable.iterator([options])`
@@ -2052,7 +2052,7 @@ changes:
* `options` {Object}
* `highWaterMark` {number} Buffer level when
[`stream.write()`][stream-write] starts returning `false`. **Default:**
`16384` (16KB), or `16` for `objectMode` streams.
`16384` (16 KB), 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
@@ -2415,7 +2415,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` (16KB), or `16` for `objectMode` streams.
**Default:** `16384` (16 KB), 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
@@ -92,7 +92,7 @@ operating systems will clean up the memory of the process after the
shutdown while attempting to free all memory to get a clean
report may have a negative impact on the code complexity and
shutdown times. Node.js does a pretty good job only leaving on
the order of 6KB that are not freed on shutdown.
the order of 6 KB that are not freed on shutdown.
## An obvious memory leak
@@ -100,7 +100,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 ~1MB of memory and never frees it
In this example, a loop which allocates ~1 MB of memory and never frees it
has been added:
```cpp
+1 -1
View File
@@ -266,7 +266,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 16KB.
Specify the maximum size of HTTP headers in bytes. Defaults to 16 KB.
.
.It Fl -napi-modules
This option is a no-op.