Search e01
One query across the encyclopedia, books, dictionary, papers, Wikidata and the developer library. Every hit carries its source.
6 results across 6 corpora for SharedArrayBuffer.
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() constructor
nstructor creates a new `Memory` object whose [`buffer`](/docs/WebAssembly/Reference/JavaScript_interface/Memory/buffer) property is a resizable ArrayBuffer or SharedArrayBuffer that holds the raw bytes of memory accessed by a [`WebAssembly.Instance`](/docs/WebAssembly/Reference/JavaScript_interface/Instance). A memory object created by JavaScript or in WebAssembly code will be accessible and mutable from both JavaS
WebAssembly.Memory.prototype.grow()
(currentMemoryView); // Uint8Array(131072) [ 0, 0, 0, ... ] // 131072 = 64KiB * 2 ``` For a shared `Memory` instance, the initial `buffer` (which would be a [`SharedArrayBuffer`](/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer) in such case) will not become detached, but rather its length will not be updated. Accesses to the `buffer` property after growing will yield a larger `SharedArrayBuffer` whic
WebAssembly.Memory.prototype.buffer
eturns 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/webassembly-examples/blob/main/js-api-examples/memory.html) on GitHub, and [view it live also](https://mdn.github.io/webassembly-examples/js-api-
Using the WebAssembly JavaScript API
ple places. In JavaScript, a Memory instance can be thought of as a resizable [`ArrayBuffer`](/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer) (or [`SharedArrayBuffer`](/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer), in the case of shared memories) and, just as with `ArrayBuffers`, a single web app can create many independent Memory objects. You can create one using the [`WebAssembly.Memo
Understanding WebAssembly text format
bAssembly Threads allow WebAssembly Memory objects to be shared across multiple WebAssembly instances running in separate Web Workers, in the same fashion as [`SharedArrayBuffer`s](/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer) in JavaScript. This enables fast communication between Workers and significant performance gains in web applications. The threads proposal has two parts: shared memories and