Hi,
I have experienced these errors, which I understand that are related to holding array buffers after memory growth:
TypeError: Cannot perform %TypedArray%.prototype.set on a neutered ArrayBuffer
at Uint8Array.set (<anonymous>)
at Object.mmap (appWASM.js:2645)
at Object.mmap (appWASM.js:4347)
at __emscripten_syscall_mmap2 (appWASM.js:5232)
at ___syscall192 (appWASM.js:5242)
at ___mmap (:1234/wasm-function[10088]:208)
Reading about this for a bit, I have a couple of questions. I know those are a lot of questions, but I'm about to write a pretty memory-intensive application, and I want to know what are my constraints and requirements. If instead of answers there's some good reading materials about WASM memory growth that is accessible to a layman I'd really appreciate a link.
- What should I do when memory growth happens?
- How do I know that a memory growth event happened?
- Can I know what objects and buffers do I need to regenerate or move?
- Can I know what triggered memory growth?
- What happens if a memory growth event happens on another thread, while native code is running?
- What exactly happens to current memory and pointers during memory growh?
- Might some of my native code pointers be made unusable? Can I know what?
- In the native code, can these neutered arrays hold stack memory, or only heap memory?
- Is there a way to check for WASM memory leaks in a running web page?
- Is there some way to know how the WASM memory is allocated? Some kind of memory map?
Thanks in advance!