Skip to content

Commit 64a185e

Browse files
Trotttargos
authored andcommitted
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: #39343 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Darshan Sen <[email protected]>
1 parent 2573bf5 commit 64a185e

File tree

8 files changed

+21
-20
lines changed

8 files changed

+21
-20
lines changed

Diff for: doc/api/buffer.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -785,7 +785,7 @@ initialized*. The contents of the newly created `Buffer` are unknown and
785785
such `Buffer` instances with zeroes.
786786

787787
When using [`Buffer.allocUnsafe()`][] to allocate new `Buffer` instances,
788-
allocations under 4KB are sliced from a single pre-allocated `Buffer`. This
788+
allocations under 4 KB are sliced from a single pre-allocated `Buffer`. This
789789
allows applications to avoid the garbage collection overhead of creating many
790790
individually allocated `Buffer` instances. This approach improves both
791791
performance and memory usage by eliminating the need to track and clean up as
@@ -5027,9 +5027,9 @@ changes:
50275027

50285028
* {integer} The largest size allowed for a single `Buffer` instance.
50295029

5030-
On 32-bit architectures, this value currently is 2<sup>30</sup> - 1 (~1GB).
5030+
On 32-bit architectures, this value currently is 2<sup>30</sup> - 1 (~1 GB).
50315031

5032-
On 64-bit architectures, this value currently is 2<sup>32</sup> (~4GB).
5032+
On 64-bit architectures, this value currently is 2<sup>32</sup> (~4 GB).
50335033

50345034
It reflects [`v8::TypedArray::kMaxLength`][] under the hood.
50355035

Diff for: doc/api/cli.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -584,10 +584,10 @@ added:
584584
changes:
585585
- version: v13.13.0
586586
pr-url: https://github.com/nodejs/node/pull/32520
587-
description: Change maximum default size of HTTP headers from 8KB to 16KB.
587+
description: Change maximum default size of HTTP headers from 8 KB to 16 KB.
588588
-->
589589

590-
Specify the maximum size, in bytes, of HTTP headers. Defaults to 16KB.
590+
Specify the maximum size, in bytes, of HTTP headers. Defaults to 16 KB.
591591

592592
### `--napi-modules`
593593
<!-- YAML
@@ -1758,8 +1758,8 @@ Sets the max memory size of V8's old memory section. As memory
17581758
consumption approaches the limit, V8 will spend more time on
17591759
garbage collection in an effort to free unused memory.
17601760

1761-
On a machine with 2GB of memory, consider setting this to
1762-
1536 (1.5GB) to leave some memory for other uses and avoid swapping.
1761+
On a machine with 2 GB of memory, consider setting this to
1762+
1536 (1.5 GB) to leave some memory for other uses and avoid swapping.
17631763

17641764
```console
17651765
$ node --max-old-space-size=1536 index.js

Diff for: doc/api/errors.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -2452,11 +2452,11 @@ changes:
24522452
- v10.15.0
24532453
commit: 186035243fad247e3955f
24542454
pr-url: https://github.com/nodejs-private/node-private/pull/143
2455-
description: Max header size in `http_parser` was set to 8KB.
2455+
description: Max header size in `http_parser` was set to 8 KB.
24562456
-->
24572457

24582458
Too much HTTP header data was received. In order to protect against malicious or
2459-
malconfigured clients, if more than 8KB of HTTP header data is received then
2459+
malconfigured clients, if more than 8 KB of HTTP header data is received then
24602460
HTTP parsing will abort without a request or response object being created, and
24612461
an `Error` with this code will be emitted.
24622462

Diff for: doc/api/fs.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -2962,8 +2962,8 @@ to read a complete file into memory.
29622962
The additional read overhead can vary broadly on different systems and depends
29632963
on the type of file being read. If the file type is not a regular file (a pipe
29642964
for instance) and Node.js is unable to determine an actual file size, each read
2965-
operation will load on 64kb of data. For regular files, each read will process
2966-
512kb of data.
2965+
operation will load on 64 KB of data. For regular files, each read will process
2966+
512 KB of data.
29672967

29682968
For applications that require as-fast-as-possible reading of file contents, it
29692969
is better to use `fs.read()` directly and for application code to manage

Diff for: doc/api/http.md

+4-3
Original file line numberDiff line numberDiff line change
@@ -2677,7 +2677,7 @@ changes:
26772677
* `maxHeaderSize` {number} Optionally overrides the value of
26782678
[`--max-http-header-size`][] for requests received by this server, i.e.
26792679
the maximum length of request headers in bytes.
2680-
**Default:** 16384 (16KB).
2680+
**Default:** 16384 (16 KB).
26812681
* `requestListener` {Function}
26822682

26832683
* Returns: {http.Server}
@@ -2787,7 +2787,8 @@ added:
27872787
* {number}
27882788

27892789
Read-only property specifying the maximum allowed size of HTTP headers in bytes.
2790-
Defaults to 8KB. Configurable using the [`--max-http-header-size`][] CLI option.
2790+
Defaults to 8 KB. Configurable using the [`--max-http-header-size`][] CLI
2791+
option.
27912792

27922793
This can be overridden for servers and client requests by passing the
27932794
`maxHeaderSize` option.
@@ -2853,7 +2854,7 @@ changes:
28532854
* `maxHeaderSize` {number} Optionally overrides the value of
28542855
[`--max-http-header-size`][] for requests received from the server, i.e.
28552856
the maximum length of response headers in bytes.
2856-
**Default:** 16384 (16KB).
2857+
**Default:** 16384 (16 KB).
28572858
* `method` {string} A string specifying the HTTP request method. **Default:**
28582859
`'GET'`.
28592860
* `path` {string} Request path. Should include query string if any.

Diff for: doc/api/stream.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1509,7 +1509,7 @@ If the loop terminates with a `break`, `return`, or a `throw`, the stream will
15091509
be destroyed. In other terms, iterating over a stream will consume the stream
15101510
fully. The stream will be read in chunks of size equal to the `highWaterMark`
15111511
option. In the code example above, data will be in a single chunk if the file
1512-
has less then 64KB of data because no `highWaterMark` option is provided to
1512+
has less then 64 KB of data because no `highWaterMark` option is provided to
15131513
[`fs.createReadStream()`][].
15141514

15151515
##### `readable.iterator([options])`
@@ -2053,7 +2053,7 @@ changes:
20532053
* `options` {Object}
20542054
* `highWaterMark` {number} Buffer level when
20552055
[`stream.write()`][stream-write] starts returning `false`. **Default:**
2056-
`16384` (16KB), or `16` for `objectMode` streams.
2056+
`16384` (16 KB), or `16` for `objectMode` streams.
20572057
* `decodeStrings` {boolean} Whether to encode `string`s passed to
20582058
[`stream.write()`][stream-write] to `Buffer`s (with the encoding
20592059
specified in the [`stream.write()`][stream-write] call) before passing
@@ -2416,7 +2416,7 @@ changes:
24162416
* `options` {Object}
24172417
* `highWaterMark` {number} The maximum [number of bytes][hwm-gotcha] to store
24182418
in the internal buffer before ceasing to read from the underlying resource.
2419-
**Default:** `16384` (16KB), or `16` for `objectMode` streams.
2419+
**Default:** `16384` (16 KB), or `16` for `objectMode` streams.
24202420
* `encoding` {string} If specified, then buffers will be decoded to
24212421
strings using the specified encoding. **Default:** `null`.
24222422
* `objectMode` {boolean} Whether this stream should behave

Diff for: doc/guides/investigating_native_memory_leak.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -92,15 +92,15 @@ operating systems will clean up the memory of the process after the
9292
shutdown while attempting to free all memory to get a clean
9393
report may have a negative impact on the code complexity and
9494
shutdown times. Node.js does a pretty good job only leaving on
95-
the order of 6KB that are not freed on shutdown.
95+
the order of 6 KB that are not freed on shutdown.
9696

9797
## An obvious memory leak
9898

9999
Leaks can be introduced in native addons and the following is a simple
100100
example leak based on the "Hello world" addon from
101101
[node-addon-examples](https://github.com/nodejs/node-addon-examples).
102102

103-
In this example, a loop which allocates ~1MB of memory and never frees it
103+
In this example, a loop which allocates ~1 MB of memory and never frees it
104104
has been added:
105105

106106
```cpp

Diff for: doc/node.1

+1-1
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ This flag is inherited from V8 and is subject to change upstream. It may
266266
disappear in a non-semver-major release.
267267
.
268268
.It Fl -max-http-header-size Ns = Ns Ar size
269-
Specify the maximum size of HTTP headers in bytes. Defaults to 16KB.
269+
Specify the maximum size of HTTP headers in bytes. Defaults to 16 KB.
270270
.
271271
.It Fl -napi-modules
272272
This option is a no-op.

0 commit comments

Comments
 (0)