pub fn sys_vmo_create(
        &self,
        size: u64,
        options: u32,
        mut out: UserOutPtr<HandleValue>,
    ) -> ZxResult {
        info!(
            "vmo.create: size={:#x?}, options={:#x?}, out={:#x?}",
            size, options, out
        );
        if options & !2u32 != 0 {
            return Err(ZxError::INVALID_ARGS);
        }
        let resizable = options != 0;
        let proc = self.thread.proc();
        let vmo = VmObject::new_paged_with_resizable(resizable, pages(size as usize));
        let handle_value = proc.add_handle(Handle::new(vmo, Rights::DEFAULT_VMO));
        out.write(handle_value)?;
        Ok(())
    }
/// Create a new virtual memory object(VMO).
Create a new virtual memory object(VMO).
Create a new virtual memory object ( VMO ) .
pub fn sys_vmo_create(
        &self,
        size: u64,
        options: u32,
        mut out: UserOutPtr<HandleValue>,
    ) -> ZxResult {
        info!(
            "vmo.create: size={:#x?}, options={:#x?}, out={:#x?}",
            size, options, out
        );
        if options & !2u32 != 0 {
            return Err(ZxError::INVALID_ARGS);
        }
        let resizable = options != 0;
        let proc = self.thread.proc();
        let vmo = VmObject::new_paged_with_resizable(resizable, pages(size as usize));
        let handle_value = proc.add_handle(Handle::new(vmo, Rights::DEFAULT_VMO));
        out.write(handle_value)?;
        Ok(())
    }
pub fn sys_vmo_create ( & self , size : u64 , options : u32 , mut out : UserOutPtr < HandleValue > , ) -> ZxResult { info ! ( " " size options out ) ; if options & ! 2u32 != 0 { return Err ( ZxError :: INVALID_ARGS ) ; } let resizable = options != 0 ; let proc = self . thread . proc ( ) ; let vmo = VmObject :: new_paged_with_resizable ( resizable , pages ( size as usize ) ) ; let handle_value = proc . add_handle ( Handle :: new ( vmo , Rights :: DEFAULT_VMO ) ) ; out . write ( handle_value ) ? ; Ok ( ( ) ) }
Create a new virtual memory object(VMO).
Create a new virtual memory object ( VMO ) .
&self
size
u64
options
u32
out
UserOutPtr<HandleValue>
&self
size
u64
options
u32
out
UserOutPtr<HandleValue>