2025-01-05 - FreeDOS Virtual Memory

When i tried to view large images on my FreeDOS system with 32 MB of memory, all image viewers ran out of memory and crashed. For this post, i will use DosView 1.7 [1] as the example.

I chose an image Jason Scott shared of an archivists lair [2]. The image size is 8 MB compressed, and GIMP reports that it takes over 67 MB decompressed.

When i tried to view this image, i got the following error:

    C:\DOSVIEW>dosview no-you-have-a-problem.png
    Can't load image no-you-have-a-problem.png
    ERROR

After i ran "LH CWSDPMI -p -sC:\CWSDPMI.SWP", then DosView churned the disk for a while and displayed the image.

    C:\DOSVIEW>dosview no-you-have-a-problem.png
    OK

This morning i tried again in a virtual machine and was not able to repeat my success. DosView always failed. This led me to suspect that my configuration was wrong. I searched for DPMI diagnostic information. At first i didn't find much. Finally, i found that DJGPP GDB can report DPMI details.

    C:\DOSVIEW>copy con sysinfo.gdb
    set pagination off
    info dos sysinfo
    quit
    ^Z

When DosView fails, GDB reports the following:

    C:\DOSVIEW>gdb --command=sysinfo.gdb | find.com "Swap"
    DPMI Swap Space................0 Bytes

When DosView succeeds, GDB reports the following:

    C:\DOSVIEW>gdb --command=sysinfo.gdb | find.com "Swap"
    DPMI Swap Space................131072 KB (128 MB)

Yesterday, DosView failed using CWSDPMI's default configuration, but succeeded when i loaded it manually. Today it is the opposite. I don't understand why this changed. Now at least i know how to check the DPMI host using DJGPP GDB.

Footnotes

[1] DosView 1.7
[2] Example image: No, You Have A Problem

Tags

bencollver
retrocomputing
technical