From: "John M. Aldrich" Newsgroups: comp.os.msdos.djgpp Subject: Re: Swap memory available Date: Fri, 16 Jan 1998 18:34:47 -0500 Organization: Two pounds of chaos and a pinch of salt. Lines: 86 Message-ID: <34BFEE97.5BB2@cs.com> References: <34BE5340 DOT 15AAA2E3 AT lps DOT u-psud DOT fr> <34BEDCC2 DOT 3342 AT cs DOT com> <34BF4E3E DOT 7060 AT lps DOT u-psud DOT fr> NNTP-Posting-Host: ppp247.cs.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Daniel TAUPIN wrote: > > > It's a runtime variable, determined by the amount of free physical > > memory and free disk space on your computer. By default, the cwsdpmi > > DPMI host uses "c:\cwsdpmi.swp" for your swap file, so its value should > > There is not cwsdpmi.swp in my computer! Of course not. It's generated on the fly and erased when your programs exit. However, if you want to see it in action, load a memory-intensive application like Emacs in plain DOS and then search for 'cwsdpmi.swp' in your root directory. You can tell how much virtual memory you're using by the size of the file (it's usually zero on my computer). Under Windows, you won't find any such file because cwsdpmi is not used. > Yes, but does this explain the difference between what is said by > GO32(v1) and GO32-V2? Go32 (v1) does not use cwsdpmi; it has its own internal DOS extender code and handles memory much differently than cwsdpmi or DJGPP v2 in general. On my machine, under Windows 95, go32 and go32-v2 give me the following information: [WIN] C:\djgpp\BIN>go32 go32 version 1.12.maint3 Copyright (C) 1994 DJ Delorie Lowest version I can run is 1.08 go32.exe usage: go32 [-d {debugger}] [{program} [{options} . . . ]] go32.exe build time was Sun Dec 18 16:36:42 1994 DPMI memory available: 35736 Kb Swap space available: 2096832 Kb [WIN] C:\djgpp\BIN>go32-v2 go32/v2 version 2.0 built Aug 12 1996 22:27:23 Usage: go32 coff-image [args] Rename this to go32.exe only if you need a go32 that can run v2 binaries as well as v1 binaries (old makefiles). Put ahead of the old go32 in your PATH but do not delete your old go32 - leave it in the PATH after this one. Set GO32_V2_DEBUG=y in the environment to get verbose output. DPMI memory available: 36111 Kb DPMI swap space available: 29041 Kb As you can see, go32 apparently records the total amount of hard drive space you have remaining as virtual memory (as well as ignoring Windows' DPMI host on the matter), while go32-v2 reports what the DPMI host provides it (in this case, Windows is giving me 64 MB of virtual memory). FYI, my hd is formatted as FAT32, but applications not aware of FAT32 report a maximum size of 2 GB. > > Oh, and don't worry about losing the use of that disk space. cwsdpmi > > only accesses swap space when it needs it; it leaves your hard drive > > alone otherwise. :-) > > > But the question is still: on which disk will cwsdpmi.swp be installed? > C: or D:? > And how can I decide it on D: rather than C:? Go to your DJGPP bin directory and type 'cwsparam'. It will allow you to view and/or change the settings of cwsdpmi, including the name of the swap file. The default is, I believe, "c:\cwsdpmi.swp" but you can change it to anything you like, including a nonexistent path. (Doing this will effectively disable virtual memory.) You can press Enter to leave the values unchanged. cwsparam only changes the settings of the 'cwsdpmi.exe' in the current directory; if you have more than one copy you'll need to update them all. BTW, if you distribute programs using a modified cwsdpmi.exe, and the swap file is set to a drive that does not exist on the user's computer, virtual memory will not work. You have been warned. Please also note that under Windows 95, or any other environment that provides DPMI services, cwsdpmi is NOT used. hth -- --------------------------------------------------------------------- | John M. Aldrich | "A committee is a life form with six | | aka Fighteer I | or more legs and no brain." | | mailto:fighteer AT cs DOT com | | | http://www.cs.com/fighteer | - Lazarus Long | ---------------------------------------------------------------------