Returns the size, in units of pages, of this Wasm memory. WebAssembly memories are made up of a whole number of pages, so the byte size returned will always be a multiple of this memory's page size. Note that different Wasm memories may have different page sizes. You can get a memory's page size via the [`Memory::page_size`] method. By default the page size is 64KiB (aka `0x10000`, `2**16`, `1<<
(&self, store: impl AsContext)
| 529 | /// |
| 530 | /// Panics if this memory doesn't belong to `store`. |
| 531 | pub fn size(&self, store: impl AsContext) -> u64 { |
| 532 | self.internal_size(store.as_context().0) |
| 533 | } |
| 534 | |
| 535 | pub(crate) fn internal_size(&self, store: &StoreOpaque) -> u64 { |
| 536 | let byte_size = self.internal_data_size(store); |
no test coverage detected