[][src]Function solana_bpf_loader::helper_sol_alloc_free

pub fn helper_sol_alloc_free(
    size: u64,
    free_ptr: u64,
    _arg3: u64,
    _arg4: u64,
    _arg5: u64,
    context: &mut Option<Box<dyn Any + 'static>>
) -> u64

Dynamic memory allocation helper called when the BPF program calls sol_alloc_free_(). The allocator is expected to allocate/free from/to a given chunk of memory and enforce size restrictions. The memory chunk is given to the allocator during allocator creation and information about that memory (start address and size) is passed to the VM to use for enforcement.