Mail Archives: djgpp/2000/10/09/11:41:10
> From: "Michael N. Filippov" <michael AT idisys DOT iae DOT nsk DOT su>
> Newsgroups: comp.os.msdos.djgpp
> Date: 9 Oct 2000 12:37:03 GMT
>
> > 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.
Because the swap file is open by the DPMI host, not by the DJGPP
program.
> 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.
In this case, the function is called by the application, but the file
is open by CWSDPMI, which is a separate program.
> Or is there a some reason why it cannot be done after DPMI server start.
You need to change the sources of CWSDPMI to do this (and the change
is not simple).
- Raw text -