/// Create new linear memory instance.
Create new linear memory instance.
Create new linear memory instance .
fn new(initial: Pages, maximum: Option<Pages>) -> Self {
		let limits = ResizableLimits::new(initial.0 as u32, maximum.map(|p| p.0 as u32));
		let initial_size: Bytes = initial.into();
		MemoryInstance {
			limits: limits,
			buffer: RefCell::new(vec![0; initial_size.0]),
			initial: initial,
			maximum: maximum,
		}
	}
fn new ( initial : Pages , maximum : Option < Pages > ) -> Self { let limits = ResizableLimits :: new ( initial . 0 as u32 , maximum . map ( | p | p . 0 as u32 ) ) ; let initial_size : Bytes = initial . into ( ) ; MemoryInstance { limits : limits , buffer : RefCell :: new ( vec ! [ 0 initial_size 0 ] ) , initial : initial , maximum : maximum , } }
Create new linear memory instance.
Create new linear memory instance .
initial
Pages
maximum
Option<Pages>