/// Grow memory by the specified amount of pages.
///
/// Returns `None` if memory can't be grown by the specified amount
/// of pages.
Grow memory by the specified amount of pages.
Returns `None` if memory can't be grown by the specified amount
of pages.
Grow memory by the specified amount of pages . Returns ` None ` if memory can ' t be grown by the specified amount of pages .
pub(crate) fn memory_grow(
        &mut self,
        memory_index: DefinedMemoryIndex,
        delta: u32,
    ) -> Option<u32> {
        let limiter = unsafe { (*self.store()).limiter() };
        let memory = self
            .memories
            .get_mut(memory_index)
            .unwrap_or_else(|| panic!("no memory for index {}", memory_index.index()));
        let result = unsafe { memory.grow(delta, limiter) };
        // Keep current the VMContext pointers used by compiled wasm code.
        self.set_memory(memory_index, self.memories[memory_index].vmmemory());
        result
    }
pub ( crate ) fn memory_grow ( & mut self , memory_index : DefinedMemoryIndex , delta : u32 , ) -> Option < u32 > { let limiter = unsafe { ( * self . store ( ) ) . limiter ( ) } ; let memory = self . memories . get_mut ( memory_index ) . unwrap_or_else ( | | panic ! ( " " memory_index index ( ) ) ) ; let result = unsafe { memory . grow ( delta , limiter ) } ; // Keep current the VMContext pointers used by compiled wasm code. self . set_memory ( memory_index , self . memories [ memory_index ] . vmmemory ( ) ) ; result }
Grow memory by the specified amount of pages.
Grow memory by the specified amount of pages .
&mut self
memory_index
DefinedMemoryIndex
delta
u32