官术网_书友最值得收藏!

WebAssembly.Memory

The WebAssembly.Memory object holds the memory accessed by a WebAssembly Instance. This memory can be accessed and changed from both JavaScript and WebAssembly. To create a new instance of Memory, you need to pass an object with an initial and (optional) maximum value to the WebAssembly.Memory() constructor. These values are in units of WebAssembly pages, where one page is 64 KB. You increase the size of the memory instance by calling the grow() function with a single parameter that represents the number of WebAssembly pages to grow by. You can also access the current buffer contained in the memory instance through its buffer property.

MDN describes two ways to get to a WebAssembly.Memory object. The first way is to construct it from JavaScript (var memory = new WebAssembly.Memory(...)), while the second way is to have it exported by a WebAssembly module. The important takeaway is that memory can be passed easily between JavaScript and WebAssembly.

主站蜘蛛池模板: 临沧市| 双峰县| 阿勒泰市| 大埔区| 新兴县| 延寿县| 晋宁县| 内黄县| 柯坪县| 淮北市| 凤庆县| 平安县| 上饶县| 靖边县| 河南省| 屏东市| 井研县| 和田县| 巍山| 永泰县| 湖南省| 陇南市| 长汀县| 怀宁县| 图们市| 岳阳县| 汝南县| 高邑县| 万全县| 梨树县| 咸阳市| 宜兴市| 伊宁市| 彭州市| 旌德县| 噶尔县| 林周县| 天台县| 积石山| 焦作市| 临夏市|