emscripten-core / emscripten

Emscripten: An LLVM-to-WebAssembly Compiler
Other
25.8k stars 3.31k forks source link

Memory Profiler Incorrectly Reporting Data as Free #21747

Open milky2028 opened 7 months ago

milky2028 commented 7 months ago

Version of emscripten/emsdk: 3.1.54

It seems like after a certain point, the memory profiler begins to report allocated memory as "free," despite not actually showing that data as free in the numbered totals. It's possible this might not be a bug. In general, I think better explanations of what's going on with memory here might be needed.

Screenshot 2024-04-11 at 2 52 51 PM

You can see this in action by using this small app I built (repo) to allocate specified chunks of memory in wasm in megabytes.

dschuff commented 7 months ago

I think this is a question for @juj ?