pub struct CraneliftHeapConfig {
pub base: u32,
pub min_size: u64,
pub max_size: Option<u64>,
pub page_size: u64,
pub needs_bounds_check: bool,
pub guard_size: u64,
}Expand description
WebAssembly-style heap (linear memory) configuration for Cranelift.
Fields§
§base: u32Base global value (pointer to start of heap).
min_size: u64Minimum heap size in bytes.
max_size: Option<u64>Maximum heap size (None = unlimited).
page_size: u64Page size (typically 65536 for Wasm).
needs_bounds_check: boolWhether bounds checking is needed.
guard_size: u64Guard size in bytes (0 = no guard pages).
Implementations§
Source§impl CraneliftHeapConfig
impl CraneliftHeapConfig
Sourcepub fn static_4gib() -> Self
pub fn static_4gib() -> Self
Create a 4 GiB static heap (no guard needed in 64-bit mode).
Sourcepub fn emit_comment(&self) -> String
pub fn emit_comment(&self) -> String
Emit a comment describing the heap configuration.
Trait Implementations§
Source§impl Clone for CraneliftHeapConfig
impl Clone for CraneliftHeapConfig
Source§fn clone(&self) -> CraneliftHeapConfig
fn clone(&self) -> CraneliftHeapConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CraneliftHeapConfig
impl Debug for CraneliftHeapConfig
Auto Trait Implementations§
impl Freeze for CraneliftHeapConfig
impl RefUnwindSafe for CraneliftHeapConfig
impl Send for CraneliftHeapConfig
impl Sync for CraneliftHeapConfig
impl Unpin for CraneliftHeapConfig
impl UnsafeUnpin for CraneliftHeapConfig
impl UnwindSafe for CraneliftHeapConfig
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