MCPcopy Index your code
hub / github.com/nodejs/node / checkMemoryUsage

Function checkMemoryUsage

test/parallel/test-stream-readable-to-web.mjs:12–14  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

10const MAX_MEM = 256 * 1024 * 1024; // 256 MiB
11
12function checkMemoryUsage() {
13 assert(memoryUsage().arrayBuffers < MAX_MEM);
14}
15
16const MAX_BUFFERS = 1000;
17let buffersCreated = 0;

Callers 1

Calls 2

memoryUsageFunction · 0.85
assertFunction · 0.50

Tested by

no test coverage detected