[−][src]Function wamr_sys::wasm_runtime_module_dup_data
pub unsafe extern "C" fn wasm_runtime_module_dup_data(
module_inst: wasm_module_inst_t,
src: *const c_char,
size: u32
) -> u32
Allocate memory from the heap of WASM module instance and initialize the memory with src
@param module_inst the WASM module instance which contains heap @param src the source data to copy @param size the size of the source data
@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.