One of the Unity developers raised some important points about WASM's memory model in a github thread. I contributed some additional thoughts here:https://github.com/WebAssembly/design/issues/1397#issuecomment-926119051 …
-
-
Replying to @cmuratori
"there are calls available that will map committed virtual pages to actual physical pages in bulk" Is there a way to do this on Windows?
1 reply 0 retweets 2 likes -
Replying to @MemoryArenaMain
Yes, there are two ways - one obvious and one not obvious :)
1 reply 0 retweets 3 likes -
Replying to @cmuratori @MemoryArenaMain
The obvious one is VirtualLock(). In my (limited) testing, it does not improve the performance substantially.
1 reply 0 retweets 5 likes -
Replying to @cmuratori @MemoryArenaMain
The non-obvious one is RIORegisterBuffer(). Although I didn't know about it last time I tested these things, it is apparently much faster. So my _assumption_ would be, if someone was going to try this on Windows, they would want to use RIORegisterBuffer().
1 reply 0 retweets 5 likes -
Replying to @cmuratori @MemoryArenaMain
If you would like a testbed for experimenting with this on Windows, I have one posted on github that you can use. I would like to add RIORegisterBuffer() but haven't gotten around to it:https://github.com/cmuratori/largepages …
2 replies 0 retweets 6 likes -
Replying to @cmuratori @MemoryArenaMain
Note tangentially that if you are running a server, you can optionally just use 2mb pages, which are always locked to physical memory by default. This is not a viable way to ship an application to consumers, but "in the cloud" you could do it, and it probably the best option.
1 reply 0 retweets 1 like
Finally, if you use RIORegisterBuffer() and it helps, be sure to thank @mmozeiko, who I believe is the person who suggested it to me. Never would have thought about it as an option otherwise.
-
-
Replying to @cmuratori @mmozeiko
Thanks for the info! I'll definitely have a look at that code
0 replies 0 retweets 1 likeThanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.