Date: Thu, 23 Sep 1999 11:21:11 +0200 (IST) From: Eli Zaretskii X-Sender: eliz AT is To: johnny_chan AT phoenix DOT com cc: djgpp-workers AT delorie DOT com Subject: Re: DJGPP virtual memory In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp-workers AT delorie DOT com X-Mailing-List: djgpp-workers AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk Actually, such questions belong to djgpp, not djgpp-workers. On Wed, 22 Sep 1999 johnny_chan AT phoenix DOT com wrote: > Q: Is it possible to disable the virtual memory feature (swap file) in DJGPP? Yes, but the way to do it depends on the underlying OS. The swap file is provided by the DPMI server or by the OS, so DJGPP itself cannot disable it. To disable VM in plain DOS with CWSDPMI, use the CWSPARAM program to point the swap file to a non-existent drive. For Windows, use Control Panel -> System -> Performance -> Virtual Memory dialog (this will disable VM for ALL Windows programs, though). > I wrote a program which will calloc() a 64MB memory. Of course, I > dont have 64MB in my system. > > If I compile this program using DJGPP (rhide) in W98, the output > program will fail during the run-time in W98. Perhaps your DOS Box isbn't set up to provide 64MB of DPMI memory. See section 15.6 of the FAQ for how to do that. > But if I compile this program using DJGPP (rhide) in DOS, the output > program will run fine in DOS... Of course, the HDD runs and I assume > it is swapping pages between HDD and RAM. > > Is it any way to disable the virtual memory here? It's not clear to me why would you want to disable VM. Care to explain what are you trying to accomplish? > what's the > difference between compiling in DOS and W98 using DJGPP? Please read Chapter 15 of the DJGPP FAQ list, I think it will answer many of your questions. If something is still unclear after that, please post here specific questions.