wasm-spatial-core
    Preparing search index...

    Function setMaxWasmMemory

    • Set the maximum WASM linear memory in bytes.

      When set to a non-zero value, checkMemoryAvailable and buildOctree will pre-check that estimated memory usage does not exceed this limit. Set to 0 (default) to disable the limit.

      Note: This does NOT change the actual WASM memory.grow limit — that is configured at module instantiation time. This is a software-level guard that pre-checks before allocating.

      Example (JS)

      core.setMaxWasmMemory(256 * 1024 * 1024); // 256 MB
      

      Parameters

      • bytes: number

      Returns void