/// Grows stable memory by specified amount.
Grows stable memory by specified amount.
Grows stable memory by specified amount .
pub(super) fn stable_grow(&mut self, additional_pages: u32) -> HypervisorResult<i32> {
        let initial_page_count = self.stable_size()? as usize;
        let additional_pages = additional_pages as usize;
        if additional_pages + initial_page_count > MAX_32_BIT_STABLE_MEMORY_IN_PAGES {
            return Ok(-1);
        }
        self.stable_memory_size = NumWasmPages::from(initial_page_count + additional_pages);
        Ok(initial_page_count
            .try_into()
            .expect("could not fit initial page count in 32 bits, although 32-bit api is used"))
    }
pub ( super ) fn stable_grow ( & mut self , additional_pages : u32 ) -> HypervisorResult < i32 > { let initial_page_count = self . stable_size ( ) ? as usize ; let additional_pages = additional_pages as usize ; if additional_pages + initial_page_count > MAX_32_BIT_STABLE_MEMORY_IN_PAGES { return Ok ( - 1 ) ; } self . stable_memory_size = NumWasmPages :: from ( initial_page_count + additional_pages ) ; Ok ( initial_page_count . try_into ( ) . expect ( " " ) ) }
Grows stable memory by specified amount.
Grows stable memory by specified amount .
&mut self
additional_pages
u32