| [ Web Proxy ] |
| Viewing: https://developer.mozilla.org/ko/docs/WebAssembly/Reference/JavaScript_interface/Memory | [Back] [Original] |
Get to know MDN better
This page was translated from English by the community. Learn more and join the MDN Web Docs community.
WebAssembly.Memory() WebAssembly Instance ArrayBuffer( ) Memory .
JavaScript WebAssembly JavaScript WebAssembly .
var myMemory = new WebAssembly.Memory(memoryDescriptor);
._ initial _ : WebAssembly Page WebAssembly .
WebAssembly WebAssembly . maximum . . WebAssembly maximum .
: WebAssembly 65,536 64KiB .
memoryDescriptor object TypeError .maximum initial RangeError .Memory instances Memory Memory() prototype object . Memory .
Memory.prototype.grow()WebAssembly ( 64KB ) .
WebAssembly.Memory . JavaScript . 10 (640KiB) 100 (6.4MiB) WebAssembly .
var memory = new WebAssembly.Memory({ initial: 10, maximum: 100 });
WebAssembly.Memory WebAssembly . (GitHub memory.html . ) WebAssembly.instantiateStreaming() memory.wasm . . .
WebAssembly.instantiateStreaming(fetch("memory.wasm"), {
js: { mem: memory },
}).then((obj) => {
var i32 = new Uint32Array(memory.buffer);
for (var i = 0; i < 10; i++) {
i32[i] = i;
}
var sum = obj.instance.exports.accumulate(0, 10);
console.log(sum);
});
| Specification |
|---|
| WebAssembly JavaScript Interface # memories |
| Unknown specification |
This page was last modified on 2026 7 15 by MDN contributors.
Your blueprint for a better internet.
Portions of this content are 19982026 by individual mozilla.org contributors. Content available under a Creative Commons license.
| Web Proxy Viewer | New URL | Original Page |