Skip to content

Heap growth notifications #12336

@kg

Description

@kg

It would be great if updateGlobalBufferAndViews could notify embedder(s) and application code that the heap has been resized, I don't see any way to get at this information currently. Right now if the heap grows, any live typed arrays pointing at the wasm heap become useless garbage, which makes it very difficult to make use of typed arrays safely when interacting with a compiled wasm binary. The fact that detached arrays are intentionally designed to fail silently makes this hard to debug as well. If there were a notification or signal we could process, that would make it possible to at least build a "safe typedarray" abstraction around this with adequate performance characteristics (wrap a typedarray instance, indirect into it with get/set methods, etc)

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