Hi Japheth,
Thank you for the amazing HDPMI project that brings all kinds of possibilities to retro-computing.
Recently I encounter a problem that when a TSR allocates DPMI memory while the foreground DPMI program is active, the allocated memory lives until the foreground program terminated.
An exception of 0E (#PF) with error code 04 (ring3 fault with present bit=0) is generated on accessing that mem, right after the foreground program terminated, logs show the access was OK while the foreground program is alive.
I check the I31MEM.ASM: 1682 and 1696, it seems the gbl.cApps was 2 when the allocation happens, and probably also 2 when the foreground program terminated.
I'm aware this TSR behavior is not good, it causes memory fragmentations anyways. FYI the actual scenario is that the SBEMU TSR tries to init TSF with some MB mem allocation, during another instance of SBEMU with soundfont options enabled.
I was using a old fork of HDPMI so I don't know whether this problem still exist. If yes, please share you ideas on it, e.g. is it being fixed or not? As a DPMI TSR is less common for old programs, and the problem now can be avoided in a way, by some workarounds, e.g. pre-alloc some mem on TSR initialization.
Thanks again.
Hi Japheth,
Thank you for the amazing HDPMI project that brings all kinds of possibilities to retro-computing.
Recently I encounter a problem that when a TSR allocates DPMI memory while the foreground DPMI program is active, the allocated memory lives until the foreground program terminated.
An exception of 0E (#PF) with error code 04 (ring3 fault with present bit=0) is generated on accessing that mem, right after the foreground program terminated, logs show the access was OK while the foreground program is alive.
I check the I31MEM.ASM: 1682 and 1696, it seems the gbl.cApps was 2 when the allocation happens, and probably also 2 when the foreground program terminated.
I'm aware this TSR behavior is not good, it causes memory fragmentations anyways. FYI the actual scenario is that the SBEMU TSR tries to init TSF with some MB mem allocation, during another instance of SBEMU with soundfont options enabled.
I was using a old fork of HDPMI so I don't know whether this problem still exist. If yes, please share you ideas on it, e.g. is it being fixed or not? As a DPMI TSR is less common for old programs, and the problem now can be avoided in a way, by some workarounds, e.g. pre-alloc some mem on TSR initialization.
Thanks again.