pub struct MemoryManagerConfig { /* private fields */ }Expand description
MemoryManagerConfig
Immutable bucket allocation policy for a runtime. The default remains 128 Wasm pages (8 MiB). Smaller sizes trade less rounding slack for a lower 32,768-bucket capacity and more frequent growth. This policy is separate from application allocation authorization and never grants memory access.
Explicit construction checks existing memory for an exact match before any effects. This is a same-release setting, not a migration or shrink operation.
Implementations§
Source§impl MemoryManagerConfig
impl MemoryManagerConfig
Sourcepub const fn new(
bucket_size_pages: u16,
) -> Result<Self, RuntimeConstructionError>
pub const fn new( bucket_size_pages: u16, ) -> Result<Self, RuntimeConstructionError>
Validate a nonzero bucket size in Wasm pages before construction effects.
Sourcepub const fn bucket_size_pages(self) -> u16
pub const fn bucket_size_pages(self) -> u16
Return the requested bucket size in pages.
Trait Implementations§
Source§impl Clone for MemoryManagerConfig
impl Clone for MemoryManagerConfig
Source§fn clone(&self) -> MemoryManagerConfig
fn clone(&self) -> MemoryManagerConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for MemoryManagerConfig
Source§impl Debug for MemoryManagerConfig
impl Debug for MemoryManagerConfig
Source§impl Default for MemoryManagerConfig
impl Default for MemoryManagerConfig
impl Eq for MemoryManagerConfig
Source§impl PartialEq for MemoryManagerConfig
impl PartialEq for MemoryManagerConfig
impl StructuralPartialEq for MemoryManagerConfig
Auto Trait Implementations§
impl Freeze for MemoryManagerConfig
impl RefUnwindSafe for MemoryManagerConfig
impl Send for MemoryManagerConfig
impl Sync for MemoryManagerConfig
impl Unpin for MemoryManagerConfig
impl UnsafeUnpin for MemoryManagerConfig
impl UnwindSafe for MemoryManagerConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more