Skip to main content

emit_alloc

Function emit_alloc 

Source
pub fn emit_alloc(oom_ptr: u32, oom_len: u32) -> Function
Expand description

Emit the alloc(size: i32) -> i32 function.

Bump allocator: returns the current heap_ptr, then advances it by size. If we exceed memory, call memory.grow.