delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/09/08/00:49:25

From: "John M. Aldrich" <fighteer AT cs DOT com>
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
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

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        |
---------------------------------------------------------------------

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019