Skip to content

Commit 5cccdcc

Browse files
committed
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 3fd04e7 commit 5cccdcc

File tree

8 files changed

+21
-20
lines changed

8 files changed

+21
-20
lines changed

doc/api/buffer.md

Lines changed: 3 additions & 3 deletions
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
@@ -5031,9 +5031,9 @@ changes:
50315031

50325032
* {integer} The largest size allowed for a single `Buffer` instance.
50335033

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

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

50385038
It reflects [`v8::TypedArray::kMaxLength`][] under the hood.
50395039

doc/api/cli.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -586,10 +586,10 @@ added:
586586
changes:
587587
- version: v13.13.0
588588
pr-url: https://github.com/nodejs/node/pull/32520
589-
description: Change maximum default size of HTTP headers from 8KB to 16KB.
589+
description: Change maximum default size of HTTP headers from 8 KB to 16 KB.
590590
-->
591591

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

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

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

17661766
```console
17671767
$ node --max-old-space-size=1536 index.js

doc/api/errors.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2456,11 +2456,11 @@ changes:
24562456
- v10.15.0
24572457
commit: 186035243fad247e3955f
24582458
pr-url: https://github.com/nodejs-private/node-private/pull/143
2459-
description: Max header size in `http_parser` was set to 8KB.
2459+
description: Max header size in `http_parser` was set to 8 KB.
24602460
-->
24612461

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

doc/api/fs.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2966,8 +2966,8 @@ to read a complete file into memory.
29662966
The additional read overhead can vary broadly on different systems and depends
29672967
on the type of file being read. If the file type is not a regular file (a pipe
29682968
for instance) and Node.js is unable to determine an actual file size, each read
2969-
operation will load on 64kb of data. For regular files, each read will process
2970-
512kb of data.
2969+
operation will load on 64 KB of data. For regular files, each read will process
2970+
512 KB of data.
29712971

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

doc/api/http.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2683,7 +2683,7 @@ changes:
26832683
* `maxHeaderSize` {number} Optionally overrides the value of
26842684
[`--max-http-header-size`][] for requests received by this server, i.e.
26852685
the maximum length of request headers in bytes.
2686-
**Default:** 16384 (16KB).
2686+
**Default:** 16384 (16 KB).
26872687
* `requestListener` {Function}
26882688

26892689
* Returns: {http.Server}
@@ -2793,7 +2793,8 @@ added:
27932793
* {number}
27942794

27952795
Read-only property specifying the maximum allowed size of HTTP headers in bytes.
2796-
Defaults to 8KB. Configurable using the [`--max-http-header-size`][] CLI option.
2796+
Defaults to 8 KB. Configurable using the [`--max-http-header-size`][] CLI
2797+
option.
27972798

27982799
This can be overridden for servers and client requests by passing the
27992800
`maxHeaderSize` option.
@@ -2861,7 +2862,7 @@ changes:
28612862
* `maxHeaderSize` {number} Optionally overrides the value of
28622863
[`--max-http-header-size`][] for requests received from the server, i.e.
28632864
the maximum length of response headers in bytes.
2864-
**Default:** 16384 (16KB).
2865+
**Default:** 16384 (16 KB).
28652866
* `method` {string} A string specifying the HTTP request method. **Default:**
28662867
`'GET'`.
28672868
* `path` {string} Request path. Should include query string if any.

doc/api/stream.md

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

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

doc/guides/investigating_native_memory_leak.md

Lines changed: 2 additions & 2 deletions
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

doc/node.1

Lines changed: 1 addition & 1 deletion
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)