|
Wasmtime
|
Helper class to build a MemoryType.
More...
#include <memory.hh>
Public Member Functions | |
| Builder () | |
| Default constructor for a memory type with 0 initial size. | |
| Builder & | min (uint64_t min) |
| Configure the minimum size, in pages, of linear memory. | |
| Builder & | max (std::optional< uint64_t > max) |
| Configure the maximal size, in pages, of linear memory. | |
| Builder & | memory64 (bool enable) |
| Configure whether this is a 64-bit linear memory. | |
| Builder & | shared (bool enable) |
| Configure whether this is a shared linear memory. | |
| Builder & | page_size_log2 (uint8_t page_size_log2) |
| Configure the page size (in bytes) of this memory type, via its log2 value. More... | |
| Result< MemoryType > | build () const |
Construct the final MemoryType value. | |
Helper class to build a MemoryType.
|
inline |
Configure the page size (in bytes) of this memory type, via its log2 value.
The default Wasm page size is 65536 (or 2**16).
With the custom-page-sizes proposal, you can configure 1-byte (or 2**0) pages by passing 0 to this method. Future extensions may enable any power-of-two page size.