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

Bug: Memory grows on repeated runs, with instance re-use #128

Closed
dphilla opened this issue Jan 9, 2024 · 1 comment
Closed

Bug: Memory grows on repeated runs, with instance re-use #128

dphilla opened this issue Jan 9, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@dphilla
Copy link
Member

dphilla commented Jan 9, 2024

For reference/reproduce

@dphilla dphilla added the bug Something isn't working label Jan 9, 2024
@dphilla dphilla self-assigned this Jan 9, 2024
@dphilla dphilla changed the title Bug: Memory grows on repeated runs, with instance reuse Bug: Memory grows on repeated runs, with instance re-use Jan 9, 2024
@dphilla
Copy link
Member Author

dphilla commented Mar 8, 2024

cc: @pojntfx

Fixed with new API for clearing active Instances/Modules.

runtime.Clear() removes all active instances from an instantiated runtime.

see: #130

This is especially important for the mentioned use-case, where, during a long-running process, repeated invocation of the same function or instance (rather than chaining different functions) causes the runtime to instantiate and manage many of the same Wasm/Scale function instances via the underlying Wasm runtime (Wazero). Now those can be managed by the user at a per-runtime level :)

@dphilla dphilla closed this as completed Mar 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant