Skip to content

How should I access the WebAssembly.Memory instance? #19832

Open
@kg

Description

@kg

I'm jitting WASM modules inside of a running emscripten-compiled application, which means I need to grab the function table and heap to share them with the jitted code.

In a single-threaded app this seems to work fine, but I'm having trouble getting the Memory object in a threaded app. I've been doing Module["asm"]["memory"] but that doesn't seem to work. How should I be doing this? Looking through the code in the emscripten repo I wasn't able to figure it out.

EDIT: To be clear, in the threaded app I get 'error: memory import must be a WebAssembly.Memory object'.

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