google / google/wasefire

Virtual memory for the interpreter

Open
#70 0 comments 0 reactions 0 assignees View on GitHub
crate:interpreter for:usability needs:design prio:low
Dominant language
Rust
Stars
188
Forks
41
Avg merge
1d 5h
Merged PRs (30d)
12

Description

It's not clear if needed, but dumping the idea in case a use-case comes up.

Currently, the interpreter doesn't constrain the size of a memory and its growth more than what the specification says. However, if the module accesses memory within what the specification permits but outside the actual available memory allocated for the module, then the module will trap. This is how memories smaller than 64kB (WebAssembly memory page size) are supported. The actual available memory is simply a prefix of the WebAssembly memory.

The proposal would be to have a more dynamic distribution of the actual memory within the WebAssembly memory, using some form of allocate-on-write with page tables (but with pages much smaller than 64kB but big enough to reduce metadata overhead). Such virtual memory would be a mapping from address prefix to a block of actual memory.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.