pub fn maps(&self) -> ProcResult<Vec<MemoryMap>> {
        use std::io::{BufRead, BufReader};

        let file = proctry!(File::open(self.root.join("maps")));

        let reader = BufReader::new(file);

        ProcResult::Ok(
            reader
                .lines()
                .filter_map(|line| {
                    let line = line.unwrap();
                    let mut s = line.splitn(6, ' ');
                    let address = expect!(s.next(), "maps::address");
                    let perms = expect!(s.next(), "maps::perms");
                    let offset = expect!(s.next(), "maps::offset");
                    let dev = expect!(s.next(), "maps::dev");
                    let inode = expect!(s.next(), "maps::inode");
                    let path = expect!(s.next(), "maps::path");

                    let mmap = MemoryMap {
                        address: split_into_num(address, '-', 16),
                        perms: perms.to_string(),
                        offset: from_str!(u64, offset, 16),
                        dev: split_into_num(dev, ':', 16),
                        inode: from_str!(u32, inode),
                        pathname: MMapPath::from(path),
                    };

                    Some(mmap)
                })
                .collect(),
        )
    }
/// Return a list of the currently mapped memory regions and their access permissions, based on
/// the `/proc/pid/maps` file.
Return a list of the currently mapped memory regions and their access permissions, based on
the `/proc/pid/maps` file.
Return a list of the currently mapped memory regions and their access permissions based on the ` / proc / pid / maps ` file .
pub fn maps(&self) -> ProcResult<Vec<MemoryMap>> {
        use std::io::{BufRead, BufReader};
        let file = proctry!(File::open(self.root.join("maps")));
        let reader = BufReader::new(file);
        ProcResult::Ok(
            reader
                .lines()
                .filter_map(|line| {
                    let line = line.unwrap();
                    let mut s = line.splitn(6, ' ');
                    let address = expect!(s.next(), "maps::address");
                    let perms = expect!(s.next(), "maps::perms");
                    let offset = expect!(s.next(), "maps::offset");
                    let dev = expect!(s.next(), "maps::dev");
                    let inode = expect!(s.next(), "maps::inode");
                    let path = expect!(s.next(), "maps::path");
                    let mmap = MemoryMap {
                        address: split_into_num(address, '-', 16),
                        perms: perms.to_string(),
                        offset: from_str!(u64, offset, 16),
                        dev: split_into_num(dev, ':', 16),
                        inode: from_str!(u32, inode),
                        pathname: MMapPath::from(path),
                    };
                    Some(mmap)
                })
                .collect(),
        )
    }
pub fn maps ( & self ) -> ProcResult < Vec < MemoryMap > > { use std :: io :: { BufRead , BufReader } ; let file = proctry ! ( File open ( self root join ( " " ) ) ) ; let reader = BufReader :: new ( file ) ; ProcResult :: Ok ( reader . lines ( ) . filter_map ( | line | { let line = line . unwrap ( ) ; let mut s = line . splitn ( 6 , ' ' ) ; let address = expect ! ( s next ( ) " " ) ; let perms = expect ! ( s next ( ) " " ) ; let offset = expect ! ( s next ( ) " " ) ; let dev = expect ! ( s next ( ) " " ) ; let inode = expect ! ( s next ( ) " " ) ; let path = expect ! ( s next ( ) " " ) ; let mmap = MemoryMap { address : split_into_num ( address , '-' , 16 ) , perms : perms . to_string ( ) , offset : from_str ! ( u64 offset 16 ) , dev : split_into_num ( dev , ':' , 16 ) , inode : from_str ! ( u32 inode ) , pathname : MMapPath :: from ( path ) , } ; Some ( mmap ) } ) . collect ( ) , ) }
Return a list of the currently mapped memory regions and their access permissions, based on
the `/proc/pid/maps` file.
Return a list of the currently mapped memory regions and their access permissions based on the ` / proc / pid / maps ` file .
&self
&self