Stand alone WASM - enormous linear memory amount

One of our customers sent a report that my toolbar cause worse LODs appearance on Xbox Series X, even if its features not active - i.e. in background mode.

Normally, all my WASM modules display 256.125MB as LinearMemory in WASM debug window. I thought it’s a bug as such small tool can’t take a lot of space.
But after I have loaded StandaloneModule sample I’ve seen that it has 112KB which sounds right.

And problem is - when I compile StandaloneModule sample code (VS2019 or VS2022, without any code changes), result WASM takes exact same amount of memory as mine - 256MB (while WASM itself is just 54KB)

Is there any VS settings or additions installed that can cause such behaviour? Or maybe its latest WASM libs included in SDK, which had no such issue at the time when example WASM were compiled?
SDK v0.23.1.0
Sim v1.36.2.0


To make the Edit&Continue works, we had to make some changes about the internal memory of a module (The stack size is set to 256 Mb)

By turning on Debug information in your wasm module, you activate the memory size part of the Edit & Continue (the Linearmemory will be set to at least 256 MB).
By turning it off, the linearmemory will recover its normal size.

Make sure that in Release Mode, this field is set to “No”

We’ve check our Standalone Module sample and have seen that this option was activated in Debug & Release, that’s why you have that result in the Debug Window. We will fix it on our side and it will be available on the next SDK update.

Thanks for pointing that problem to us.

Best Regards
Maxime / Asobo


Many thanks for quick response! LinearMemory drops to 1.8MB
I hope it will solve memory issues

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.