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

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.

主站蜘蛛池模板: 临桂县| 淳安县| 科技| 鱼台县| 岳池县| 黑山县| 贡嘎县| 大田县| 富宁县| 滨海县| 称多县| 盱眙县| 建水县| 锡林郭勒盟| 固安县| 兴海县| 驻马店市| 响水县| 米易县| 安福县| 稷山县| 琼海市| 嘉峪关市| 名山县| 皮山县| 湘西| 饶河县| 灵宝市| 扎囊县| 甘泉县| 清水河县| 安阳市| 吉首市| 岳阳市| 尉氏县| 封丘县| 桓台县| 雷州市| 灵石县| 屏边| 麻栗坡县|