Date: Wed, 16 Nov 1994 08:45:15 -0500 (EST) From: Martin Miller Subject: Virtual memory and DPMI (and Win 3.1) To: djgpp AT sun DOT soe DOT clarkson DOT edu Cc: dj AT stealth DOT ctron DOT com Greetings, I recently downloaded and installed djgpp thru 1.12.maint2 and things seem to be mostly working -- and have compiled and run several simple test programs. As part of my testing I ran the following program in a DOS box under Windows 3.1, as well as from the normal system command line (ie NOT under Windows): #include #include #define MAXKB (8*1024) int main() { int kb = 0; while( kb < MAXKB && malloc(1024) ) printf( " allocated %5d kb\r", ++kb ); return 0; } As you can see, the program simply trys to allocate 8192 1K blocks, or 8 Mb. The idea was to verify that virtual memory worked -- because this is more physical memory than is free on my system after booting-up. I ran the program with the GO32 environment variable set to "nodpmi", in addition to not specifying it, which I assume causes dpmi to be used if it's available. My conflicting results were: Normal DOS: =========== default: fails after allocating approx 4 Mb with the message "DPMI: Not enough memory" nodpmi: ran sucessfully Win DOS box: ============ default: ran sucessfully nodpmi: won't run at all with some message about being in V86 mode (the actual amount allocated in the cases that failed was not exactly the same, although I don't think that's important) I'm using DOS 6.2 and QEMM 7.04 with QDPMI,SYS installed, so dpmi support should be there even when not using a Windows DOS box, right?. Isn't virtual memory suppose to work, regardless of the presence of dpmi (assuming you have the disk space)? Is there some way to set GO32 so that the program would work whether or not it was run from a Windows DOS box or not? Thanks in advance. ---- Thanks, Martin mrmiller AT delphi DOT com /\/\./\/\.