rdnelson / Libra

An 8086 emulator with a focus on educational features.
Other
13 stars 4 forks source link

Reloading file doesn't flush the memory log cache / long hangs when flushing cache #165

Closed DarrenStahl closed 11 years ago

DarrenStahl commented 11 years ago

The emulator stores a log of memory accesses for each instruction. This log is cached while the program is running, and flushed after it stops. If the program runs for a long time (infinite(ish) loop), or the program is not stopped, but instead hits HLT, and/or is realoaded, the cache builds up and causes a hang when flushed.

Repro:

  1. a) Run an infinite loop for a couple seconds. OR b) Run a file to HLT, then reload without pressing stop or stepping features
  2. Use the debugging stepping features

Result: The program hangs while the cache is flushed.

Issues/fixes: Program hangs a long time for writes. Maybe only open the file handle once, and append all in once go, or use a separate thread to prevent hanging of GUI?

Cache is not flushed until stepping. Flush cache when program is stopped, paused, or reloaded. Requires fixing of long hang times in order to be viable.