Mail Archives: djgpp/2000/10/09/08:45:56
Charles Sandmann <sandmann AT clio DOT rice DOT edu> wrote:
>> I would rather tune CWSDPMI parameters). The problem with virtual memory
>> is even deeper: this program starts from floppy to repair file system on
>> the local hard drive, so i cannot use default c:\cwsdpmi,swp, It would
>> be nice to have ability to enable/disable swap and change swap file path
>> (if there's a network drive for example) in the run-time (e.g to have
>> select_file_box() with checkbox "enable/disable swap" :). Because
>> I dont know if it possible with CWSDPMI or any other appropriate
>> DPMI server [second question] I have no arguments to convince the
>> customer, because to have additional executable is a very big minus
>> for him.
> You could not do it at run-time from DJGPP code (you are running in the
> DPMI server at the time...). But this information is stored in the
> executable itself - so you could modify the image and re-start, or hack
> the embedded stub to let you change it in-memory before invoking the DPMI
> server (before you make the change from real mode to PM). You could also
> have it be a command line argument (the original CWSDPMI command line
> argument code for setting swap location is currently compile time disabled
> in the embedded stub so it would not confict with arguments passed to
> DJGPP code).
I see no reason of principle why program cannot change swap file on-the-fly
(file descriptor) if there's no busy pages in this file yet. Example:
CWSDPMI parameters are set not to have swap file at the start (Full
name of paging file ("" to disable) ? [""]) and if the program sees
that it is close to running out of memory, it would call something like
set_paging_file("t:\cwsdpmi.swp") function to enable swap.
Or is there a some reason why it cannot be done after DPMI server start.
Sincerely,
Michael
- Raw text -