Skip to main content

jit_v2_struct_alloc

Function jit_v2_struct_alloc 

Source
#[unsafe(no_mangle)]
pub extern "C" fn jit_v2_struct_alloc(total_size: u32) -> *mut u8
Expand description

Allocate a v2 typed struct with the given total size (including header).

Sets refcount=1 and kind=HK_V2_TYPED_STRUCT. All field bytes are zeroed.

§Arguments

  • total_size - Total allocation size in bytes (header + fields). Must be >= 8.

§Returns

Pointer to the allocated struct, or null on allocation failure.