[−][src]Function wamr_sys::wasm_runtime_module_malloc
pub unsafe extern "C" fn wasm_runtime_module_malloc(
module_inst: wasm_module_inst_t,
size: u32,
p_native_addr: *mut *mut c_void
) -> u32
Allocate memory from the heap of WASM module instance
@param module_inst the WASM module instance which contains heap @param size the size bytes to allocate @param p_native_addr return native address of the allocated memory if it is not NULL, and return NULL if memory malloc failed
@return the allocated memory address, which is a relative offset to the base address of the module instance's memory space. Note that it is not an absolute address. Return non-zero if success, zero if failed.