pub fn new(initial: u32, maximum: Option<u32>) -> Self {
        assert!(initial <= MAX_PAGES);
        assert!(maximum.is_none() || maximum.unwrap() <= MAX_PAGES);

        let len = PAGE_SIZE * match maximum {
            Some(val) => val,
            None => initial,
        };
        let mmap = memmap::MmapMut::map_anon(len as usize).unwrap();
        Self {
            mmap,
            current: initial,
            maximum,
        }
    }
/// Create a new linear memory instance with specified initial and maximum number of pages.
///
/// `maximum` cannot be set to more than `65536` pages.
Create a new linear memory instance with specified initial and maximum number of pages.
`maximum` cannot be set to more than `65536` pages.
Create a new linear memory instance with specified initial and maximum number of pages . ` maximum ` cannot be set to more than ` 65536 ` pages .
pub fn new(initial: u32, maximum: Option<u32>) -> Self {
        assert!(initial <= MAX_PAGES);
        assert!(maximum.is_none() || maximum.unwrap() <= MAX_PAGES);
        let len = PAGE_SIZE * match maximum {
            Some(val) => val,
            None => initial,
        };
        let mmap = memmap::MmapMut::map_anon(len as usize).unwrap();
        Self {
            mmap,
            current: initial,
            maximum,
        }
    }
pub fn new ( initial : u32 , maximum : Option < u32 > ) -> Self { assert ! ( initial MAX_PAGES ) ; assert ! ( maximum is_none ( ) maximum unwrap ( ) MAX_PAGES ) ; let len = PAGE_SIZE * match maximum { Some ( val ) => val , None => initial , } ; let mmap = memmap :: MmapMut :: map_anon ( len as usize ) . unwrap ( ) ; Self { mmap , current : initial , maximum , } }
Create a new linear memory instance with specified initial and maximum number of pages.
Create a new linear memory instance with specified initial and maximum number of pages .
initial
u32
maximum
Option<u32>
initial
u32
maximum
Option<u32>