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

doc: VM module, how to make VM out of scope and free resources (collected by GC)? #3497

Closed
1 task done
rafi16jan opened this issue Mar 10, 2021 · 2 comments
Closed
1 task done
Labels

Comments

@rafi16jan
Copy link

📗 API Reference Docs Problem

  • Version: v14.0.0
  • Platform: Linux localhost 4.14.67 Feature Request: HTTP2 node#4 SMP PREEMPT Mon Jan 14 11:28:51 CST 2019 x86_64 Intel(R) Core(TM) i3-7100U CPU @ 2.40GHz GenuineIntel GNU/Linux
  • Subsystem: vm

Location

Section of the site where the content exists

Affected URL(s):

Description

Concise explanation of the problem

I am developing a WASM app that utilizes node's http server and I plan to create a cluster/worker pool that destroys the cluster/worker when WASM memory was grown (is that the correct word?) out of the needed amount. This happen because WASM supports growing memory but not shrinking it, take a look at this issue. My application already utilizes a memory reset logic that works flawlessly, but still the total allocated memory was the last amount of used memory and it jumps especially when there's a huge incoming requests that get in.

A solution would be deleting all variable reference of the WASM Module instance, Memory instance, and etc and let node's GC collect unused resources but emscripten's emit so many global variable that refers to the instances and I think deleting them is complicated. So if we execute the emscripten's JS glue code and the WASM on a VM context, can we make it out of scope (make the GC collects it) since there's no way to destroy it as specified on the docs?


  • I would like to work on this issue and
    submit a pull request.
@targos targos transferred this issue from nodejs/node Aug 9, 2021
Copy link

It seems there has been no activity on this issue for a while, and it is being closed in 30 days. If you believe this issue should remain open, please leave a comment.
If you need further assistance or have questions, you can also search for similar issues on Stack Overflow.
Make sure to look at the README file for the most updated links.

@github-actions github-actions bot added the stale label May 10, 2024
Copy link

github-actions bot commented Jun 9, 2024

It seems there has been no activity on this issue for a while, and it is being closed. If you believe this issue should remain open, please leave a comment.
If you need further assistance or have questions, you can also search for similar issues on Stack Overflow.
Make sure to look at the README file for the most updated links.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jun 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant