Skip to content

Lower bound on number of WebAssembly.Memory objects implementations should support? #1167

@eholk

Description

@eholk

The backing stores for WebAssembly.Memory objects can be large or be backed by large address space allocations. Furthermore, implementation may wish to limit the total amount of address space used by a process.

Should we note, either normatively or non-normatively, some lower bound for the amount of memory or number of memory objects that implementations should be able to handle in use at once? If so, should this be in terms of number of memories, or number of bytes in the backing store?

So far most apps have one Wasm module, instance and memory that consists of the entire application, so supporting one memory (or some small number, like 5) should be sufficient. In the future, we might see applications made up of many independent instances and memories (for example, many WebPack modules). It would be nice to be able to say to developers "you can expect that at least this many will work."

Obviously this will be constrained by available resources; a machine with 256MB of RAM won't reasonably be able to support a 2GB Wasm Memory. The goal instead is to say "insofar as possible, implementations should not put in limits below X."

We currently have a test in WPT that checks that we can make 600 memories (although this will probably decrease to 20 soon). This was an arbitrary number that should be larger than any reasonable app would want. At the very least, if we're going to test a number, we should have some agreement on what that number should be.

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