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

Method addMemory

deps/v8/test/mjsunit/wasm/wasm-module-builder.js:1487–1496  ·  view source on GitHub ↗
(min, max, shared)

Source from the content-addressed store, hash-verified

1485 }
1486
1487 addMemory(min, max, shared) {
1488 // Note: All imported memories are added before declared ones (see the check
1489 // in {addImportedMemory}).
1490 const imported_memories =
1491 this.imports.filter(i => i.kind == kExternalMemory).length;
1492 const mem_index = imported_memories + this.memories.length;
1493 this.memories.push(
1494 {min: min, max: max, shared: shared || false, is_memory64: false});
1495 return mem_index;
1496 }
1497
1498 addMemory64(min, max, shared) {
1499 // Note: All imported memories are added before declared ones (see the check

Callers 15

instantiateWasmFunction · 0.95
newModuleFunction · 0.95
generateBuilderFunction · 0.95
TestFunction · 0.95
testCompileLoadStoreFunction · 0.95
TestFunction · 0.95
generateBuilderFunction · 0.95
generateBuilderFunction · 0.95

Calls 2

filterMethod · 0.65
pushMethod · 0.45

Tested by

no test coverage detected