# [−][src]Function core::arch::wasm32::memory::grow

    pub unsafe fn grow(mem: i32, delta: i32) -> i32

🔬 This is a nightly-only experimental API. (`stdsimd` #48556)
This is supported on MIPS only.

Corresponding intrinsic to wasm's `memory.grow` instruction

This function, when called, will attempt to grow the default linear memory by the specified `delta` of pages. If memory is successfully grown then the previous size of memory, in pages, is returned. If memory cannot be grown then -1 is returned.

The argument `mem` is the numerical index of which memory to return the size of. Note that currently wasm only supports one memory, so specifying a nonzero value will likely result in a runtime validation error of the wasm module.

# Help

## Keyboard Shortcuts

`?`
  Show this help dialog
`S`
  Focus the search field
`↑`
  Move up in search results
`↓`
  Move down in search results
`↹`
  Switch tab
`⏎`
  Go to active search result
`+`
  Expand all sections
`-`
  Collapse all sections

## Search Tricks

Prefix searches with a type followed by a colon (e.g. `fn:`) to restrict the search to a given type.

Accepted types are: `fn`, `mod`, `struct`, `enum`, `trait`, `type`, `macro`, and `const`.

Search functions by type signature (e.g. `vec -> usize` or `* -> vec`)

Search multiple things at once by splitting your query with comma (e.g. `str,u8` or `String,struct:Vec,test`)