pub fn new(max_size: usize, name: &str) -> Result<Self, Error> {
        let (mapping, _) = Mapping::allocate(max_size)
            .map_err(|e| format_err!("failed to allocate vmo zx status={}", e))?;
        let heap = Heap::new(Rc::new(mapping))?;
        let state = State::create(heap)?;
        let root_node =
            Node::allocate(Arc::new(Mutex::new(state)), name, constants::ROOT_PARENT_INDEX)?;
        Ok(Inspector { root_node })
    }
/// Create a new Inspect VMO object with the given maximum size.
Create a new Inspect VMO object with the given maximum size.
Create a new Inspect VMO object with the given maximum size .
pub fn new(max_size: usize, name: &str) -> Result<Self, Error> {
        let (mapping, _) = Mapping::allocate(max_size)
            .map_err(|e| format_err!("failed to allocate vmo zx status={}", e))?;
        let heap = Heap::new(Rc::new(mapping))?;
        let state = State::create(heap)?;
        let root_node =
            Node::allocate(Arc::new(Mutex::new(state)), name, constants::ROOT_PARENT_INDEX)?;
        Ok(Inspector { root_node })
    }
pub fn new ( max_size : usize , name : & str ) -> Result < Self , Error > { let ( mapping , _ ) = Mapping :: allocate ( max_size ) . map_err ( | e | format_err ! ( " " e ) ) ? ; let heap = Heap :: new ( Rc :: new ( mapping ) ) ? ; let state = State :: create ( heap ) ? ; let root_node = Node :: allocate ( Arc :: new ( Mutex :: new ( state ) ) , name , constants :: ROOT_PARENT_INDEX ) ? ; Ok ( Inspector { root_node } ) }
Create a new Inspect VMO object with the given maximum size.
Create a new Inspect VMO object with the given maximum size .
max_size
usize
name
&str
max_size
usize
name
&str