-
Notifications
You must be signed in to change notification settings - Fork 693
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
Creating WebAssembly Memory from existing ArrayBuffer #1226
Comments
You want to create the |
I will note that I read issue #1162 and was left feeling confused and pessimistic. FWIW: To use WebAssembly today with only one Memory, I wrote elaborate WebAssembly code with pages, directories, address ranges, etc. . . . basically application-specific memory management. There are logically six tables inside one array. One can do a lot with one Memory if you are sufficiently motivated. |
jfbastien, OK. Thanks for the quick response. |
See also WebAssembly/spec#831. |
Is there a way to do this?
Starting from the beginning:
I create a complicated structure, optimized for fast display in an ArrayBuffer. Roughly 100Mbytes. User input causes the code to do computations against the structure and present results on WebGL. Because the structure is so optimized - and I use WebAssembly - I can get good response times.
However, the process for building the structure takes a while and is about to take much longer. I would like to delegate the "structure creation" code to a Web Worker. The user can then do things while the structure is being built. When it is complete, the ArrayBuffer is passed to the main thread and the user can do even more things. Yay!!
But I don't know how to put the existing ArrayBuffer into a WebAssembly.Memory in the main thread. I can do a copy in Javascript but I seriously dislike that option.
Lil help please!
The text was updated successfully, but these errors were encountered: