Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possibility to dynamically add memories at runtime? #19

Closed
tomaka opened this issue Mar 16, 2021 · 2 comments
Closed

Possibility to dynamically add memories at runtime? #19

tomaka opened this issue Mar 16, 2021 · 2 comments

Comments

@tomaka
Copy link

tomaka commented Mar 16, 2021

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

@rossberg
Copy link
Member

rossberg commented Apr 6, 2021

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.

@rossberg
Copy link
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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants