Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
91 commits
Select commit Hold shift + click to select a range
18ae2c3
tools: lint osx shell scripts
LiviaMedeiros Apr 14, 2022
ef5ab81
doc: fix `added:` info for `outgoingMessage.{,un}cork()`
lpinca Apr 14, 2022
2a07a9f
doc: document the 'close' and 'finish' events
lpinca Apr 14, 2022
be44b1f
test: improve test coverage of internal/blob
kuriyosh Apr 14, 2022
deb3cf4
test: remove the legacy url parser function
cola119 Apr 14, 2022
78a860a
test_runner: add initial CLI runner
cjihrig Apr 15, 2022
2f38b48
meta: move mmarchini to emeritus
mmarchini Apr 16, 2022
6b7c35e
doc: delete mdb_v8 from diagnostic tooling support tiers
tony-go Apr 16, 2022
1a7af63
src: large page attributing an id on Linux
devnexen Apr 17, 2022
294664e
deps: upgrade npm to 8.7.0
Apr 14, 2022
c50309c
doc: fix `added:` info for `outgoingMessage.writable*`
lpinca Apr 17, 2022
14893c5
meta: update AUTHORS
nodejs-github-bot Apr 17, 2022
47c0481
tools: update lint-md-dependencies
nodejs-github-bot Apr 17, 2022
93fd77a
tools: update doc to highlight.js@11.5.1
nodejs-github-bot Apr 17, 2022
4694f5b
async_hooks: avoid decrementing iterator after erase
dygabo Apr 17, 2022
459546b
benchmark: fix misc/startup failure
aduh95 Apr 17, 2022
d77c59d
doc: improve fragment (`:target`) anchors behavior on HTML version
aduh95 Apr 17, 2022
4c30936
doc: copyedit http.OutgoingMessage documentation
lpinca Apr 17, 2022
222b3e6
doc: close tag in n-api.md
LiviaMedeiros Apr 18, 2022
962d80b
doc: add documentation for inherited methods
lpinca Apr 18, 2022
29c8411
bootstrap: move embedded snapshot to SnapshotBuilder
joyeecheung Apr 11, 2022
6bd2420
bootstrap: use the isolate snapshot in workers
joyeecheung Apr 11, 2022
d311916
test: fix calculations in test-worker-resource-limits
joyeecheung Apr 11, 2022
025b3e7
doc: consolidate use of multiple-byte units
aduh95 Apr 19, 2022
7c97347
build: improve the format-cpp error message
RaisinTen Apr 19, 2022
c3922af
worker: add hasRef() to the handle object
RaisinTen Apr 19, 2022
46c880b
doc: clarify core modules that can be loaded without a prefix
aduh95 Apr 19, 2022
3d65a3b
doc: add `node:` prefix for all core modules
aduh95 Apr 20, 2022
b7e9dd0
src: use `node:` prefix in example
aduh95 Apr 20, 2022
5d15eb1
build: fix format-cpp
RaisinTen Apr 20, 2022
1976284
src: define fs.constants.S_IWUSR & S_IRUSR for Win
ilg-ul Apr 21, 2022
33ac027
meta: move one or more collaborators to emeritus
nodejs-github-bot Apr 18, 2022
6225370
doc: fix version history for Loaders API
aduh95 Apr 21, 2022
c32f76d
doc: fix example in assert.md
LiviaMedeiros Apr 21, 2022
8476ffb
test: use `assert.match()` instead of `assert(regex.test())`
aduh95 Apr 21, 2022
6fa080c
doc: delete heapdump from diagnostic tooling support tiers
tony-go Apr 21, 2022
d9f3f05
doc: fix outdated documentation for `family` property
aduh95 Apr 21, 2022
59da133
doc: add maintaining-webassembly.md
mhdawson Apr 8, 2022
c46e7bb
doc: add @kuriyosh to collaborators
kuriyosh Apr 22, 2022
c6c1dc5
doc: order `vm.Module` linker arguments correctly
SimenB Apr 22, 2022
b0f7c4c
lib,src: implement WebAssembly Web API
tniessen Apr 23, 2022
a19fb60
v8: export more fields in getHeapStatistics
theanarkh Apr 23, 2022
7681e60
crypto: validate `this` in all webcrypto methods and getters
panva Apr 23, 2022
f9994e2
build: improve reliability of find_python.cmd script
lpinca Apr 23, 2022
d33cbab
lib: remove experimental warning from FormData
meixg Apr 24, 2022
4050b0d
build: enable V8's shared read-only heap
targos Apr 24, 2022
494650c
src,crypto: remove uses of AllocatedBuffer from crypto_ec.cc
RaisinTen Apr 24, 2022
0e16120
errors,vm: update error and use cause
devsnek Apr 22, 2022
37364ab
test: fix flaky HTTP server tests
tniessen Apr 24, 2022
fdc6503
meta: update AUTHORS
nodejs-github-bot Apr 24, 2022
97fc00a
tools: update eslint to 8.14.0
nodejs-github-bot Apr 24, 2022
1b5856a
wasi: remove unecessary null check
mhdawson Apr 24, 2022
9b61ac2
doc: update WebAssembly strategy with Wasm Web API
tniessen Apr 25, 2022
c3c5fe7
tools: bump jsdoccomment from 0.22.1 to 0.29.0
Trott Apr 25, 2022
7b70144
test: skip test that cannot pass under --node-builtin-modules-path
GeoffreyBooth Apr 25, 2022
ad82694
lib,src: use Response URL as WebAssembly location
tniessen Apr 25, 2022
2d76f72
doc: elevate node-clinic diagnostic tier
RafaelGSS Apr 20, 2022
cd2f5a4
doc: add primordials guidelines
aduh95 May 11, 2021
48bbb73
fs: fix mkdirSync so ENOSPC is correctly reported
santigimeno Apr 26, 2022
0725064
test: fix port in net-perf_hooks
LiviaMedeiros Apr 26, 2022
2f849a4
doc: fix markdown formatting in primordials.md
tniessen Apr 27, 2022
59c07a9
test: check ecdsa psychic signature
panva Apr 27, 2022
b85a11c
test: improve lib/internal/test_runner/test.js coverage
fossamagna Apr 27, 2022
fe65996
doc: clarify guide on testing internal errors
LiviaMedeiros Apr 27, 2022
a6e1e7a
doc,test: add tests and docs for duplex.fromWeb and duplex.toWeb
ErickWendel Apr 28, 2022
336242a
errors,console: refactor to use ES2021 syntax
xtx1130 Apr 28, 2022
7fae2c9
deps: add template for generated headers
danbev Apr 5, 2022
e8734a4
deps: add note about removing asm archs
danbev Apr 14, 2022
6dc1f82
deps: remove archs/aix64-gcc
danbev Apr 9, 2022
8dc71f2
deps: remove aix-gcc architecture
danbev Apr 14, 2022
4abe987
deps: remove linux-ppc architecture
danbev Apr 14, 2022
2798929
deps: remove linux-ppc64 architecture
danbev Apr 14, 2022
1102922
deps: upgrade npm to 8.8.0
npm-robot Apr 28, 2022
37ca110
src: make --no-node-snapshot a per-process option
joyeecheung Apr 28, 2022
e15d22c
doc: initial version of security-model-strategy.md
mhdawson Apr 12, 2022
dab15f6
esm: graduate top-level-await to stable
aduh95 Apr 28, 2022
8f2b228
doc: record March 2022 security release steward
richardlau Apr 28, 2022
e313dc6
doc: http2.createServer `options` as optional
daeyeon Apr 28, 2022
227a45b
doc: remove legacy `-J` test.py option from BUILDING.md
LiviaMedeiros Apr 21, 2022
60e461c
doc: reword "test directory"
LiviaMedeiros Apr 21, 2022
e808366
src: turn SSL_CTX_new CHECK/segfault into JS exception
addaleax Apr 28, 2022
3c796f8
test: fix `parallel/test-dgram-udp6-link-local-address`
aduh95 Apr 28, 2022
a0638a2
esm: fix imports from non-file module
aduh95 Apr 29, 2022
4af0fbd
v8: export cpu_profiler_metadata_size in getHeapCodeStatistics
theanarkh Apr 29, 2022
fbda87d
test: simplify test-gc-{http-client,net}-*
lpinca Apr 19, 2022
8e0e576
test: add tests for extracting function name
cola119 May 1, 2022
718d11f
perf_hooks: return different functions in timerify
himself65 Apr 24, 2022
1e7479d
tools: update lint-md-dependencies
nodejs-github-bot May 1, 2022
bf9240a
worker: add hasRef() to MessagePort
RaisinTen May 2, 2022
2a4c826
deps: update undici to 5.1.1
targos May 2, 2022
f35f8a6
2022-05-03, Version 18.1.0 (Current)
targos May 2, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
doc: consolidate use of multiple-byte units
Refs: https://en.wikipedia.org/wiki/Byte#Multiple-byte_units

PR-URL: #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>
  • Loading branch information
aduh95 authored and targos committed Apr 28, 2022
commit 025b3e786a3773eb078beb46a37376a08ecaaf9f
6 changes: 3 additions & 3 deletions doc/api/buffer.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.

Expand Down
8 changes: 4 additions & 4 deletions doc/api/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`

Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions doc/api/errors.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
12 changes: 6 additions & 6 deletions doc/api/fs.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions doc/api/http.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down
6 changes: 3 additions & 3 deletions doc/api/stream.md
Original file line number Diff line number Diff line change
Expand Up @@ -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])`
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions doc/api/util.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion doc/contributing/investigating-native-memory-leaks.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion doc/node.1
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion lib/assert.js
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ function getCode(fd, line, column) {
let lines = 0;
// Prevent blocking the event loop by limiting the maximum amount of
// data that may be read.
let maxReads = 32; // bytesPerRead * maxReads = 512 kb
let maxReads = 32; // bytesPerRead * maxReads = 512 KiB
const bytesPerRead = 16384;
// Use a single buffer up front that is reused until the call site is found.
let buffer = Buffer.allocUnsafe(bytesPerRead);
Expand Down
2 changes: 1 addition & 1 deletion lib/fs.js
Original file line number Diff line number Diff line change
Expand Up @@ -2879,7 +2879,7 @@ function lazyLoadStreams() {

/**
* Creates a readable stream with a default `highWaterMark`
* of 64 kb.
* of 64 KiB.
* @param {string | Buffer | URL} path
* @param {string | {
* flags?: string;
Expand Down
2 changes: 1 addition & 1 deletion lib/internal/crypto/scrypt.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const defaults = {
N: 16384,
r: 8,
p: 1,
maxmem: 32 << 20, // 32 MB, matches SCRYPT_MAX_MEM.
maxmem: 32 << 20, // 32 MiB, matches SCRYPT_MAX_MEM.
};

function scrypt(password, salt, keylen, options, callback = defaults) {
Expand Down
2 changes: 1 addition & 1 deletion lib/internal/errors.js
Original file line number Diff line number Diff line change
Expand Up @@ -1004,7 +1004,7 @@ E('ERR_FS_CP_SYMLINK_TO_SUBDIRECTORY',
'Cannot overwrite symlink in subdirectory of self', SystemError);
E('ERR_FS_CP_UNKNOWN', 'Cannot copy an unknown file type', SystemError);
E('ERR_FS_EISDIR', 'Path is a directory', SystemError);
E('ERR_FS_FILE_TOO_LARGE', 'File size (%s) is greater than 2 GB', RangeError);
E('ERR_FS_FILE_TOO_LARGE', 'File size (%s) is greater than 2 GiB', RangeError);
E('ERR_FS_INVALID_SYMLINK_TYPE',
'Symlink type must be one of "dir", "file", or "junction". Received "%s"',
Error); // Switch to TypeError. The current implementation does not seem right
Expand Down
2 changes: 1 addition & 1 deletion lib/internal/fs/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ const kMaximumCopyMode = COPYFILE_EXCL |
COPYFILE_FICLONE |
COPYFILE_FICLONE_FORCE;

// Most platforms don't allow reads or writes >= 2 GB.
// Most platforms don't allow reads or writes >= 2 GiB.
// See https://github.com/libuv/libuv/pull/1501.
const kIoMaxLength = 2 ** 31 - 1;

Expand Down
6 changes: 3 additions & 3 deletions src/inspector_agent.cc
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,11 @@ static int StartDebugSignalHandler() {
pthread_attr_t attr;
CHECK_EQ(0, pthread_attr_init(&attr));
#if defined(PTHREAD_STACK_MIN) && !defined(__FreeBSD__)
// PTHREAD_STACK_MIN is 2 KB with musl libc, which is too small to safely
// receive signals. PTHREAD_STACK_MIN + MINSIGSTKSZ is 8 KB on arm64, which
// PTHREAD_STACK_MIN is 2 KiB with musl libc, which is too small to safely
// receive signals. PTHREAD_STACK_MIN + MINSIGSTKSZ is 8 KiB on arm64, which
// is the musl architecture with the biggest MINSIGSTKSZ so let's use that
// as a lower bound and let's quadruple it just in case. The goal is to avoid
// creating a big 2 or 4 MB address space gap (problematic on 32 bits
// creating a big 2 or 4 MiB address space gap (problematic on 32 bits
// because of fragmentation), not squeeze out every last byte.
// Omitted on FreeBSD because it doesn't seem to like small stacks.
const size_t stack_size = std::max(static_cast<size_t>(4 * 8192),
Expand Down
2 changes: 1 addition & 1 deletion test/common/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ On non-Windows platforms, this always returns `true`.

### `createZeroFilledFile(filename)`

Creates a 10 MB file of all null characters.
Creates a 10 MiB file of all null characters.

### `enoughTestMem`

Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-crypto-scrypt.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const good = [
},
// Test vectors from https://tools.ietf.org/html/rfc7914#page-13 that
// should pass. Note that the test vector with N=1048576 is omitted
// because it takes too long to complete and uses over 1 GB of memory.
// because it takes too long to complete and uses over 1 GiB of memory.
{
pass: '',
salt: '',
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-fs-util-validateoffsetlength.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ const {
);
}

// Most platforms don't allow reads or writes >= 2 GB.
// Most platforms don't allow reads or writes >= 2 GiB.
// See https://github.com/libuv/libuv/pull/1501.
const kIoMaxLength = 2 ** 31 - 1;

Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-http2-max-session-memory-leak.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const http2 = require('http2');
// mechanism.

const bodyLength = 8192;
const maxSessionMemory = 1; // 1 MB
const maxSessionMemory = 1; // 1 MiB
const requestCount = 1000;

const server = http2.createServer({ maxSessionMemory });
Expand Down
4 changes: 2 additions & 2 deletions test/parallel/test-tls-securepair-leak.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ setImmediate(() => {
global.gc();
const after = process.memoryUsage().external;

// It's not an exact science but a SecurePair grows .external by about 45 kB.
// It's not an exact science but a SecurePair grows .external by about 45 KiB.
// Unless AdjustAmountOfExternalAllocatedMemory() is called on destruction,
// 10,000 instances make it grow by well over 400 MB. Allow for some slop
// 10,000 instances make it grow by well over 400 MiB. Allow for some slop
// because objects like buffers also affect the external limit.
assert(after - before < 25 << 20);
});
2 changes: 1 addition & 1 deletion tools/compress_json.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

# To make decompression a little easier, we prepend the compressed data
# with the size of the uncompressed data as a 24 bits BE unsigned integer.
assert len(text) < 1 << 24, 'Uncompressed JSON must be < 16 MB.'
assert len(text) < 1 << 24, 'Uncompressed JSON must be < 16 MiB.'
data = struct.pack('>I', len(text))[1:4] + data

step = 20
Expand Down
4 changes: 2 additions & 2 deletions tools/gyp/pylib/gyp/generator/ninja.py
Original file line number Diff line number Diff line change
Expand Up @@ -2112,8 +2112,8 @@ class MEMORYSTATUSEX(ctypes.Structure):
ctypes.windll.kernel32.GlobalMemoryStatusEx(ctypes.byref(stat))

# VS 2015 uses 20% more working set than VS 2013 and can consume all RAM
# on a 64 GB machine.
mem_limit = max(1, stat.ullTotalPhys // (5 * (2 ** 30))) # total / 5GB
# on a 64 GiB machine.
mem_limit = max(1, stat.ullTotalPhys // (5 * (2 ** 30))) # total / 5GiB
hard_cap = max(1, int(os.environ.get("GYP_LINK_CONCURRENCY_MAX", 2 ** 32)))
return min(mem_limit, hard_cap)
elif sys.platform.startswith("linux"):
Expand Down
2 changes: 1 addition & 1 deletion tools/inspector_protocol/encoding/encoding.h
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ namespace cbor {
// must use a 32 bit wide length.
// - At the top level, a message must be an indefinite length map
// wrapped by an envelope.
// - Maximal size for messages is 2^32 (4 GB).
// - Maximal size for messages is 2^32 (4 GiB).
// - For scalars, we support only the int32_t range, encoded as
// UNSIGNED/NEGATIVE (major types 0 / 1).
// - UTF16 strings, including with unbalanced surrogate pairs, are encoded
Expand Down
2 changes: 1 addition & 1 deletion tools/inspector_protocol/lib/encoding_h.template
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ namespace cbor {
// must use a 32 bit wide length.
// - At the top level, a message must be an indefinite length map
// wrapped by an envelope.
// - Maximal size for messages is 2^32 (4 GB).
// - Maximal size for messages is 2^32 (4 GiB).
// - For scalars, we support only the int32_t range, encoded as
// UNSIGNED/NEGATIVE (major types 0 / 1).
// - UTF16 strings, including with unbalanced surrogate pairs, are encoded
Expand Down
2 changes: 1 addition & 1 deletion tools/msvs/install_tools/install_tools.bat
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ echo This script will install Python and the Visual Studio Build Tools, necessar
echo to compile Node.js native modules. Note that Chocolatey and required Windows
echo updates will also be installed.
echo.
echo This will require about 3 Gb of free disk space, plus any space necessary to
echo This will require about 3 GiB of free disk space, plus any space necessary to
echo install Windows updates. This will take a while to run.
echo.
echo Please close all open programs for the duration of the installation. If the
Expand Down
2 changes: 1 addition & 1 deletion tools/v8_gypfiles/features.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@
# will fail.
'v8_enable_webassembly%': 1,

# Enable advanced BigInt algorithms, costing about 10-30 KB binary size
# Enable advanced BigInt algorithms, costing about 10-30 KiB binary size
# depending on platform.
'v8_advanced_bigint_algorithms%': 1
},
Expand Down