pub fn with_init(len: usize, init_from: &[u8]) -> io::Result<UserMem> {
        assert!(len >= init_from.len());

        let mut m = UserMem::new(len)?;
        m.load(PhysAddr(0), init_from);
        Ok(m)
    }
/// Allocate a zero-initialized memory region of `len` bytes and initialize the first bytes
/// with `init_from`.
///
/// # Panics
///
/// Panics if `init_from` is larger than the memory size `len`.
Allocate a zero-initialized memory region of `len` bytes and initialize the first bytes
with `init_from`.
Allocate a zero - initialized memory region of ` len ` bytes and initialize the first bytes with ` init_from ` .
pub fn with_init(len: usize, init_from: &[u8]) -> io::Result<UserMem> {
        assert!(len >= init_from.len());
        let mut m = UserMem::new(len)?;
        m.load(PhysAddr(0), init_from);
        Ok(m)
    }
pub fn with_init ( len : usize , init_from : & [ u8 ] ) -> io :: Result < UserMem > { assert ! ( len init_from len ( ) ) ; let mut m = UserMem :: new ( len ) ? ; m . load ( PhysAddr ( 0 ) , init_from ) ; Ok ( m ) }
Allocate a zero-initialized memory region of `len` bytes and initialize the first bytes
with `init_from`.
Allocate a zero - initialized memory region of ` len ` bytes and initialize the first bytes with ` init_from ` .
len
usize
init_from
&[u8]
panics
Panics if `init_from` is larger than the memory size `len`.
Panics if ` init_from ` is larger than the memory size ` len ` .