Skip to content
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

Improve memory accounting #207

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Conversation

justjake
Copy link
Owner

  • Enable malloc_usable_size and other previously linux-only features that Emscripten can actually emulate. This should improve memory accounting.
  • Breaking: runtime.computeMemoryUsage() now directly returns a host Javascript object, instead of a handle. We no longer need a "system context" to pass the result back as a JSValue.
  • remove runtime.getSystemContext() since it has no callers and is private
  • Breaking: Use Emscripten STRICT=1 mode, dropping some properties previously exposed on the Emscripten module type
  • Maybe breaking: Enable Emscripten WASM_BIGINT=1 mode, which may cause some internal functions to return bigint instead of number.

Fixes #206

@jsProj
Copy link

jsProj commented Dec 2, 2024

Just curious about any updates on this.

@justjake
Copy link
Owner Author

justjake commented Dec 2, 2024

I haven’t made any progress on this. I usually find time to do maintenance on this project around Christmas, so that’s the earliest I would work on it.

I if I recall, I hit issues trying to convince Emscripten & quickjs to behave together the way I want — it should be possible but it seems to require more invasive patching of quickjs than I had patience for at the time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Getting accurate readings of Memory
2 participants