Mail Archives: djgpp/1997/09/08/00:49:25
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 -