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

Extend instantiate() with a memory limit #509

Closed
axic opened this issue Aug 24, 2020 · 2 comments · Fixed by #515
Closed

Extend instantiate() with a memory limit #509

axic opened this issue Aug 24, 2020 · 2 comments · Fixed by #515

Comments

@axic
Copy link
Member

axic commented Aug 24, 2020

This would replace the hard MemoryPagesLimit in limits.h. If no limit is set by the user, it defaults to MemoryPagesLimit (256Mb). If it is set higher than 2^32-1 return an error (or just make the limit uint32).

Also set this limit to 4Gb in spectests in order to pass them.

@gumb0
Copy link
Collaborator

gumb0 commented Sep 2, 2020

  1. 4Gb limit is already enforced by validation, do we want a new error raised when incorrect limit passed to instantiate?

  2. memory.grow currently also aborts when exceeding MemoryPagesLimit. We would need to save the hard limit to Instance to use it in execute, too.

@axic
Copy link
Member Author

axic commented Sep 2, 2020

All we want is a new configurable limit (part of the Instance). We can default to our 256Mb limit if it is not set my the user.

@gumb0 gumb0 closed this as completed in #515 Sep 4, 2020
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 a pull request may close this issue.

2 participants