From: "John M. Aldrich" Newsgroups: comp.os.msdos.djgpp Subject: Re: COULD YOU HELP ME???? Date: Sun, 07 Sep 1997 23:58:02 +0000 Organization: Two pounds of chaos and a pinch of salt Lines: 26 Message-ID: <34133F8A.5BCC@cs.com> References: <5uj1pv$59c AT snews3 DOT zippo DOT com> Reply-To: fighteer AT cs DOT com NNTP-Posting-Host: ppp108.cs.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk ludovic karim wrote: > > Is it possible to desactive with djgpp the windows95's virtual disk???? > in fact i would like free all the memory without hard disk access... There is no way to externally disable the use of virtual memory in Windows 95; it is an integral part of the operating system and if a program tried to shut it off, it would probably crash. In DJGPP programs, you can set the global _crt0_startup_flags variable with the _CRT0_FLAG_LOCK_MEMORY flag. This causes all allocated memory to be immediately locked by sbrk(), thus effectively disabling virtual memory for the program. Windows 95 should swap out as much memory as it can to make room for your program, however you will never be able to lock all memory. To completely disable virtual memory, run your program in MS-DOS mode and stubedit it to use 'cwsdpr0.exe' instead of 'cwsdpmi.exe'. -- --------------------------------------------------------------------- | John M. Aldrich | "Sex should be friendly. Otherwise | | aka Fighteer I | stick to mechanical toys; it's more | | mailto:fighteer AT cs DOT com | sanitary." | | http://www.cs.com/fighteer | - Lazarus Long | ---------------------------------------------------------------------