wasmtime_memory_page_size function
- @Native<Uint64 Function(Pointer<
wasmtime_context_t> , Pointer<wasmtime_memory_t> )>(ffi.Pointer<wasmtime_context_t>, ffi.Pointer<wasmtime_memory_t>)>()
- Pointer<
wasmtime_context_t> store, - Pointer<
wasmtime_memory_t> memory
\brief Returns the size of a page, in bytes, for this memory.
\param store the store that owns memory
\param memory the memory to get the page size of
WebAssembly memories are made up of a whole number of pages, so the byte size (as returned by #wasmtime_memory_data_size) will always be a multiple of their page size. Different Wasm memories may have different page sizes.
By default this is 64KiB (aka 0x10000, 2**16, 1<<16, or 65536)
but the custom-page-sizes proposal allows opting into a page size of
1. Future extensions might allow any power of two as a page size.
Implementation
@ffi.Native<
ffi.Uint64 Function(
ffi.Pointer<wasmtime_context_t>,
ffi.Pointer<wasmtime_memory_t>,
)
>()
external int wasmtime_memory_page_size(
ffi.Pointer<wasmtime_context_t> store,
ffi.Pointer<wasmtime_memory_t> memory,
);