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

feat: enhance lowMemoryLimit to support larger than 64k memory limitation #2910

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

Conversation

HerrCai0907
Copy link
Member

This PR want lowMemoryLimit to accept memory limitation which more than 64k but cannot be divisible by 64k.
It can help generated wasm module with fine-grained memory management.

@MaxGraey
Copy link
Member

MaxGraey commented Feb 10, 2025

LowMemoryLimit was originally introduced for embedded devices with very limited RAM for which even a single 64k bytes (single page) was not possible

@HerrCai0907
Copy link
Member Author

This pr want to let this limitation available for some larger ram devices.
some rumtime like v8 will not allocate memory when memory grow. instead, they will allocate when memory is used.

for example, some embedden devices have 1MB ram, but still not enough to run multiple wasm together. it is good to use this option to limit ram usage less than e.g. 1.5 wasm pages.

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.

2 participants