GO-Ve01
ServicesDevelopersBooksDictionaryPapersWikidataEncyclopediaSearchBabelCareersDeck

Search e01

One query across the encyclopedia, books, dictionary, papers, Wikidata and the developer library. Every hit carries its source.

12 results across 6 corpora for WebAssembly.Memory.prototype.buffer.

Papers 6

Developer library 6

WebAssembly.Memory

The **`WebAssembly.Memory`** object is a resizable ArrayBuffer or SharedArrayBuffer that holds raw bytes of memory accessed by a [`WebAssembly.Instance`](/docs/WebAssembly/Reference/JavaScript_interface/Instance). Both WebAssembly and JavaScript can create `Memory` objects. If you want to access the memory created in JS from WebAssembly, or vice versa, you can export the memory from the module to JavaScript or impor

WebAssembly.Memory.prototype.grow()

The **`grow()`** prototype method of the [`WebAssembly.Memory`](/docs/WebAssembly/Reference/JavaScript_interface/Memory) object increases the size of the memory instance by a specified number of WebAssembly pages. ## Syntax ```js-nolint grow(delta) ``` ### Parameters - `delta` - : The number of WebAssembly pages you want to grow the memory by (each one is 64KiB in size). For memories with an address type of

WebAssembly.Memory.prototype.buffer

The read-only **`buffer`** prototype property of the [`WebAssembly.Memory`](/docs/WebAssembly/Reference/JavaScript_interface/Memory) object returns the buffer contained in the memory. Depending on whether or not the memory was constructed with `shared: true`, the buffer is either an ArrayBuffer or a SharedArrayBuffer. ## Examples ### Using buffer The following example (see [memory.html](https://github.com/mdn/weba

Using the WebAssembly JavaScript API

This article teaches you how to use the key features of the WebAssembly JavaScript API, including loading Wasm modules and manipulating WebAssembly memories, tables, and globals. > [!NOTE] > If you are unfamiliar with the basic concepts mentioned in this article and need more explanation, read [WebAssembly concepts](/docs/WebAssembly/Guides/Concepts) first, then come back. ## Loading Wasm modules in JavaScript Let

ArrayBuffer

e features make resizing `ArrayBuffer`s more efficient — otherwise, you have to make a copy of the buffer with a new size. It also gives JavaScript parity with WebAssembly in this regard (Wasm linear memory can be resized with [`WebAssembly.Memory.prototype.grow()`](/docs/WebAssembly/Reference/JavaScript_interface/Memory/grow)). ### Transferring ArrayBuffers `ArrayBuffer` objects can be transferred between differen

ArrayBuffer.prototype.transfer()

ons. Currently, only certain web APIs are capable of creating `ArrayBuffer` objects with designated detaching methods, such as GPUBuffer.getMappedRange() and [`WebAssembly.Memory.buffer`](/docs/WebAssembly/Reference/JavaScript_interface/Memory/buffer). ## Description The `transfer()` method performs the same operation as the [structured clone algorithm](/docs/Web/API/Web_Workers_API/Structured_clone_algorithm). It

JSON results · Services directory