Skip to main content

sdk_alloc

Function sdk_alloc 

Source
pub fn sdk_alloc(size: usize) -> *mut u8
Expand description

Allocate size bytes via the Rust allocator and leak the allocation.

Returns a raw pointer suitable for sharing with the host via linear memory. These allocations are intentionally leaked — WASM plugin instances are short-lived and all memory is reclaimed when the instance is dropped.