Skip to main content

nova_rt_alloc

Function nova_rt_alloc 

Source
#[unsafe(no_mangle)]
pub extern "C" fn nova_rt_alloc(size: i64) -> *mut u8
Expand description

Allocate size zeroed bytes for a heap value — a sum { tag, fields... }, record { fields... }, array { len, elems... }, or closure environment. The result is GC-managed and its slots are traced for further pointers.

Never returns null: a size too large to describe as a heap layout, and one the system allocator cannot satisfy, both abort (see [gc::alloc]).