delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/10/09/11:41:10

Date: Mon, 09 Oct 2000 17:41:19 +0200
From: "Eli Zaretskii" <eliz AT is DOT elta DOT co DOT il>
Sender: halo1 AT zahav DOT net DOT il
To: "Michael N. Filippov" <michael AT idisys DOT iae DOT nsk DOT su>
Message-Id: <2110-Mon09Oct2000174119+0300-eliz@is.elta.co.il>
X-Mailer: Emacs 20.6 (via feedmail 8.3.emacs20_6 I) and Blat ver 1.8.5h
CC: djgpp AT delorie DOT com
In-reply-to: <8rse5f$16q7$1@news.itfs.nsk.su> (michael@idisys.iae.nsk.su)
Subject: Re: Memory amount and PMODE
References: <20001008141510 DOT 8288 DOT qmail AT idisys DOT iae DOT nsk DOT su> <39e05b5e DOT sandmann AT clio DOT rice DOT edu> <8rse5f$16q7$1 AT news DOT itfs DOT nsk DOT su>
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

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


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