Date: Wed, 23 Jul 1997 02:41:16 -0600 From: Esa Peuha Subject: Re: mem alloc taking up power of 2 Newsgroups: comp.os.msdos.djgpp Message-ID: <869643575.29800@dejanews.com> Organization: Deja News Posting Service References: <33cc4f06 DOT 4823733 AT 192 DOT 189 DOT 54 DOT 145> <869552497 DOT 24200 AT dejanews DOT com> <33D4D349 DOT 269C AT cs DOT com> Lines: 23 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk In article <33D4D349 DOT 269C AT cs DOT com>, fighteer AT cs DOT com wrote: > Nothing is actually written to the swap file until touching a page of > memory requires swapping out a page in physical memory. cwsdpmi is very > intelligent about this; those extra 20k blocks should never actually > take up space in the swap file. However, they do count towards the > total memory that can be allocated. > > AFAIK, allocated memory always remains purely "virtual" until it is > actually used. So if I write a program that allocates all the memory it can get, writes a file that fills the hard disk, and then begins to fill the memory it has allocated, what will happen when there's no physical free memory left? Obviously the DPMI host must page out some memory, but it can't because there's no free disk space, so it must crash the program. Very nice and intelligent indeed ;-) BTW, if it crashes with SIGSEGV, then this can be the reason I crashed ld.exe a while back. -------------------==== Posted via Deja News ====----------------------- http://www.dejanews.com/ Search, Read, Post to Usenet