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

Dynamic WASM Memory Limit #29

Open
Mi1ind opened this issue Feb 23, 2021 · 2 comments
Open

Dynamic WASM Memory Limit #29

Mi1ind opened this issue Feb 23, 2021 · 2 comments
Labels
category - enhancement New feature or request

Comments

@Mi1ind
Copy link
Contributor

Mi1ind commented Feb 23, 2021

Modify/Allocate required memory size as needed so we never run into out of bounds memory error.
Make it like a rune.json file (similar to package.json).

@Mi1ind Mi1ind added category - enhancement New feature or request rune labels Feb 23, 2021
@Michael-F-Bryan
Copy link
Contributor

We should be able to directly calculate the expected memory usage from a Runefile. I don't think wasmer-runtime provides an explicit hook for capping the amount of memory given to an Instance, but we could always customise the global allocator (wee_alloc) to make sure it only ever requests a certain number of pages from the runtime.

That said, the phrase "out of bounds memory error" is oddly specific, and sounds a lot more like a pointer or indexing issue than unbounded memory usage.

@Michael-F-Bryan
Copy link
Contributor

Note to self: check this comment for links to examples and related issues when implementing memory limits in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category - enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants