添加链接
link之家
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Learn more about Collectives

Teams

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Learn more about Teams

emscripten compiled program exceeds chrome memory on windows, with developer tools open the program runs fine

Ask Question

We have a larger C-program compiled with emscripten (and ASYNCIFY enabled). The program runs fine with Chrome on Mac, on Windows the page comes up, but eats constantly memory up to 6GB, then the page dies with "Aw, Snap!". However if I open the developer tools beforehand and then type the application url into the address bar the application runs without problems (in the range of 400MB). Same for MS-Edge on Windows. Does that ring a bell to someone ? In the dev console nothing is visible so far what might cause the issue. Any hint how to find the cause would be appreciated.

The problem above did arise with compiling with -O1 (and we had to choose -O1 because with no optimization we did run into another quirk:

failed to asynchronously prepare wasm: CompileError: WebAssembly.Module doesn't parse at byte 4: Function's number of locals is too big 108469 maximum 50000, in function at index 4350 [Warning] Aborted(CompileError: WebAssembly.Module doesn't parse at byte 4: Function's number of locals is too big 108469 maximum 50000, in function at index 4350)

,see my other question here too many locals to run liveness analysis

We ended up compiling with -Os , this did solve both problems so far for us. It isn't really satisfying however to operate with optimization options like being in a mine field....

Thanks for contributing an answer to Stack Overflow!

  • Please be sure to answer the question . Provide details and share your research!

But avoid

  • Asking for help, clarification, or responding to other answers.
  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers .