Skip to content

Report memory pressure to SM #42168

@sagudev

Description

@sagudev

In noticed this in wgpu repo: gfx-rs/wgpu#8930 (comment) where reporting more memory to JS engine will help trigger GC sooner and maybe thats the solution we need for OOM in webgpu CTS. But we should also use this for other stuff (canvases and such).

Relevant SM functions are here: https://searchfox.org/firefox-main/source/js/public/MemoryFunctions.h#78

BTW gecko also reports this for every dom object: https://searchfox.org/firefox-main/source/dom/bindings/BindingUtils.h#2930 and maybe we should too.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions