-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
performance.measureUserAgentSpecificMemory #3159
Labels
Comments
This was referenced Nov 20, 2022
|
Yes, performance.measureUserAgentSpecificMemory sounds perfect! |
emilk
changed the title
window.performance.memory
Mar 11, 2023
performance.measureUserAgentSpecificMemory
emilk
changed the title
performance.measureUserAgentSpecificMemory
Mar 11, 2023
performance.measureUserAgentSpecificMemory
Liamolucko
added a commit
to Liamolucko/wasm-bindgen
that referenced
this issue
Mar 13, 2023
Fixes rustwasm#3159 This is a Chrome-only API for measuring the memory usage of JS/wasm. So, I've marked it as unstable.
alexcrichton
pushed a commit
that referenced
this issue
May 8, 2023
Fixes #3159 This is a Chrome-only API for measuring the memory usage of JS/wasm. So, I've marked it as unstable.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Motivation
window.performance.memory
in an API for accessing the memory use of JavaScript (and by extension, wasm).Example JS:
window.performance.memory.usedJSHeapSize
Proposed Solution
Add a
Memory
feature flag to exposewindow.performance.memory
with three fields:js_heap_size_limit
total_js_heap_size
used_js_heap_size
Alternatives
WASM apps can install a custom
#[global_allocator]
that does its own bookkeeping of amount of RAM used.Additional Context
Knowing the memory used by a WASM application is useful for it to know whether or not to try free up some memory.
The text was updated successfully, but these errors were encountered: