- 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.
- Java逍遙游記
- Design Principles for Process:driven Architectures Using Oracle BPM and SOA Suite 12c
- Drupal 8 Blueprints
- PyTorch自然語言處理入門與實戰
- 基于免疫進化的算法及應用研究
- PHP 編程從入門到實踐
- Mastering C# Concurrency
- SQL Server 2016數據庫應用與開發
- 從零開始學C#
- Clojure for Machine Learning
- Domain-Driven Design in PHP
- Lift Application Development Cookbook
- Java EE實用教程
- Building Scalable Apps with Redis and Node.js
- JavaScript重難點實例精講