-
Notifications
You must be signed in to change notification settings - Fork 469
wasm64: support memory larger than 16 GB #1892
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
Comments
Note this is a standard limit imposed by the JS API, it's not necessarily the same limit in other embedding contexts. Any limit is subject to future revision, but if your use case is outside of the web, then an engine could provide more memory. |
Is this documented somewhere? |
Yes, the link you provided was into the JS-API documentation, which is technically separate from the core Wasm specification. |
Ah, I see. Is this due to a limitation of JS execution engines like browsers/node? Where do I lobby to increase the JS-API limit? |
I believe you have found the correct forum. The JS-API spec is maintained alongside the wasm core spec here: https://github.com/WebAssembly/spec/blob/main/document/js-api/index.bs. |
I encountered the same issue as you did, and I discovered that the 16GB memory limit is also documented in the source code of the V8 engine. : src/wasm/wasm-limits.h - v8/v8 - Git at Google |
I asked this question at emscripten-core/emscripten#23966 and was told it's a limitation imposed by the spec.
In wasm64, the spec caps the maximum memory to 16 GB in https://github.com/WebAssembly/memory64/blob/9003cd5e24e53b84cd9027ea3dd7ae57159a6db1/document/js-api/index.bs#L1785.
Could we please get wasm64 to support as much memory available from the host machine's RAM? I'd also like to understand reasons behind the 16GB limit when technically 64-bit integers can be used to index memories much larger than 16GB.
@sbc100
The text was updated successfully, but these errors were encountered: