Skip to content

Support 4GB memories instead of 4GB minus one page #3022

@alexcrichton

Description

@alexcrichton

Currently Wasmtime stores the current length of a memory as a u32 size in bytes, which means it can't represent the current length of memory if memory is exactly 4GB large (which takes 33 bits to represent). This means that Wasmtime only supports 4GB heaps minus one page, but we should ideally fix this issue to fully support a 4GB heap in the future.

Likely the main impact of this will be modifying JIT code to load/store a 64-bit value and/or multiplying the current_length by some factor. We know the length is always a multiple of wasm page size, so we could store the length as a multiple of that as well.

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