Open lnxjnky opened 3 years ago
Any guidance please?
I am expecting that multiple allocations of HEAP variables with buffer size inside updateGlobalBufferViews will be sharing the buffer space and are not individual allocations. Even if there are global variables in the native code which might be initialized at the time of wasm load should be using the same shared array buffer right? How can we identify such variables, any tools?
This issue has been automatically marked as stale because there has been no activity in the past year. It will be closed automatically if no further activity occurs in the next 30 days. Feel free to re-open at any time if this issue is still relevant.
Hello, I am porting cross platform code to Webassembly with USE_PTHREADS=1, PTHREAD_POOL_SIZE=8, TOTAL_MEMORY/INITIAL_MEMORY=64MB. While running the code in chrome as browser extension, I observe that in chrome task manager that the memory usage of extension is around 350MB even when it is in idle state. I made sure that none of the extension JS code is using that memory and also decreasing PTHREAD_POOL_SIZE is not helping. I checked most of the memory is allocated at the time of wasm load itself much before I invoke my native methods.
Just trying to figure out if there are any hidden gotchas or an advisable way to use memory efficiently while compiling for WASM? I have below code in the generated JS file.