Skip to content
This repository was archived by the owner on Apr 25, 2025. It is now read-only.
This repository was archived by the owner on Apr 25, 2025. It is now read-only.

Possibility to dynamically add memories at runtime? #19

Description

@tomaka

I couldn't figure out the answer by reading the overview.
Is it planned to be able for host functions to add more memories to an already-running Wasm instance?

There are a couple of use cases that would need this:

  • A Wasm module could ask the host to spawn another Wasm module, in which case it is desirable to share a memory between the parent and the child for "inter-process" ("inter-instance") communication.
  • Implementing some equivalent to mmap.

Might be related to #9

Activity

  1. rossberg commented on Apr 6, 2021

    @rossberg
    Member

    Dynamic memory creation would essentially require first-class memories, i.e., a sort of memoryref type and corresponding instructions. That is certainly a useful feature, but far more involved (both design and implementation-wise), and hence out of scope for the current proposal. This one is merely a straightforward generalisation of the existing memory semantics that mirrors what we already did for tables.

  2. rossberg commented on Nov 22, 2021

    @rossberg
    Member

    Closing this since it's out of scope of this proposal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions