- Learn WebAssembly
- Mike Rourke
- 156字
- 2021-08-13 15:38:54
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.
- Mastering Concurrency Programming with Java 8
- 從零構(gòu)建知識(shí)圖譜:技術(shù)、方法與案例
- GAE編程指南
- Photoshop智能手機(jī)APP UI設(shè)計(jì)之道
- 名師講壇:Java微服務(wù)架構(gòu)實(shí)戰(zhàn)(SpringBoot+SpringCloud+Docker+RabbitMQ)
- 軟件工程
- 小程序開發(fā)原理與實(shí)戰(zhàn)
- Mastering Ext JS
- Apache Mahout Clustering Designs
- Flutter跨平臺(tái)開發(fā)入門與實(shí)戰(zhàn)
- Python之光:Python編程入門與實(shí)戰(zhàn)
- ASP.NET程序開發(fā)范例寶典
- Raspberry Pi Robotic Blueprints
- .NET Standard 2.0 Cookbook
- C語(yǔ)言程序設(shè)計(jì)與應(yīng)用(第2版)