nepx / halfix

x86 PC emulator that runs both natively and in the browser, via WebAssembly
https://nepx.github.io/halfix-demo/
GNU General Public License v3.0
669 stars 86 forks source link

out of memory #27

Open Pixelsuft opened 3 years ago

Pixelsuft commented 3 years ago

I've installed Windows 98 SE (OEM) on halfix and it works good (with splitted/normal image). But when I'm running in browser: image Host: Windows 10 x64 Pro Browser: Google Chrome Memory: 16GB

nepx commented 3 years ago

Oh, that's strange. I tried it on x64 Chrome on Ubuntu 18.04 and it worked. But I used a different image than yours. When does it crash? Does it crash on Firefox? (if it crashes on Firefox, it is likely an emulator bug, if it doesn't, then it's likely a Chrome bug)

The emulator itself doesn't allocate more memory at runtime (it allocates all of the memory it needs up-front, and it does not generate new code at runtime), so unless it is crashing as soon as you try to initialize it, I think that it's either a browser bug or the disk driver tries to cache too much and it crashes. The disk driver loads files using XMLHttpRequest and caches it on the host so that it doesn't need to be re-downloaded, that speeds things up a lot.

If the WASM module gave an out-of-memory exception, that would be something that I could easily fix, but when it's the browser itself, it's a lot harder to debug because you can't directly manage memory in the browser.

On 5/24/21, @. @.> wrote:

I've installed Windows 98 SE (OEM) on halfix and it works good (with splitted/normal image). But when I'm running in browser: image Host: Windows 10 x64 Pro Browser: Google Chrome Memory: 16GB

-- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/nepx/halfix/issues/27

Pixelsuft commented 3 years ago

I've runned it in FireFox in ubuntu (in VMware) and it stuck after load (but page not stuck)

Pixelsuft commented 3 years ago

Now I've installed windows using bochs (not halfix) and I'm having out of memory again. In safe mode it works good.