Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
🛤 Bulk memory operations #1114
This is a tracking issue for a post-MVP feature
Copying and clearing large memory regions is very common, and making these
We expect that WebAssembly producers will use these operations when the region
I'm a little concerned about how the temp buffer interacts with shared memory and observability of reads and writes since, in practice, we'll want to avoid using such a buffer. Specifically, the agent that performs the copying creates an order s.t. all reads from the source and writes to the temp buffer are ordered before all reads from the temp buffer and writes to the destination. Another agent can be writing to the source and reading from the target to see what happens; almost certainly that agent can observe that the ordering implied by the temp buffer is violated.
Now, that violation might be allowed by the memory model anyway, since
Still, I have this nagging thought that we should perhaps spec
I wrote up a quick gist w/ some spec text here: https://gist.github.com/binji/acc43b94c0a747e51dfafa1b5b099c9a
This still uses a temp buffer, but I think it makes it clearer that it is just a spec implementation detail. Probably could add a note to that effect as well.