From: "Michael N. Filippov" Newsgroups: comp.os.msdos.djgpp Subject: Re: Memory amount and PMODE Date: 9 Oct 2000 12:37:03 GMT Lines: 33 Message-ID: <8rse5f$16q7$1@news.itfs.nsk.su> References: <20001008141510 DOT 8288 DOT qmail AT idisys DOT iae DOT nsk DOT su> <39e05b5e DOT sandmann AT clio DOT rice DOT edu> NNTP-Posting-Host: idisys.iae.nsk.su X-Trace: news.itfs.nsk.su 971095023 39751 193.124.169.11 (9 Oct 2000 12:37:03 GMT) X-Complaints-To: usenet AT news DOT itfs DOT nsk DOT su NNTP-Posting-Date: 9 Oct 2000 12:37:03 GMT User-Agent: tin/pre-1.4-19990517 ("Psychonaut") (UNIX) (Linux/2.4.0-test1 (i586)) To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Charles Sandmann 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