pub(crate) fn allocate(&mut self, size: usize) -> VmResult<u32> {
        let ret = self.call_function1("allocate", &[to_u32(size)?.into()])?;
        let ptr = ref_to_u32(&ret)?;
        if ptr == 0 {
            return Err(CommunicationError::zero_address().into());
        }
        Ok(ptr)
    }
/// Requests memory allocation by the instance and returns a pointer
/// in the Wasm address space to the created Region object.
Requests memory allocation by the instance and returns a pointer
in the Wasm address space to the created Region object.
Requests memory allocation by the instance and returns a pointer in the Wasm address space to the created Region object .
pub(crate) fn allocate(&mut self, size: usize) -> VmResult<u32> {
        let ret = self.call_function1("allocate", &[to_u32(size)?.into()])?;
        let ptr = ref_to_u32(&ret)?;
        if ptr == 0 {
            return Err(CommunicationError::zero_address().into());
        }
        Ok(ptr)
    }
pub ( crate ) fn allocate ( & mut self , size : usize ) -> VmResult < u32 > { let ret = self . call_function1 ( " " , & [ to_u32 ( size ) ? . into ( ) ] ) ? ; let ptr = ref_to_u32 ( & ret ) ? ; if ptr == 0 { return Err ( CommunicationError :: zero_address ( ) . into ( ) ) ; } Ok ( ptr ) }
Requests memory allocation by the instance and returns a pointer
in the Wasm address space to the created Region object.
Requests memory allocation by the instance and returns a pointer in the Wasm address space to the created Region object .
&mut self
size
usize