delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/07/25/00:03:29

From: "John M. Aldrich" <fighteer AT cs DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: mem alloc taking up power of 2
Date: Tue, 22 Jul 1997 15:35:37 +0000
Organization: Two pounds of chaos and a pinch of salt
Lines: 28
Message-ID: <33D4D349.269C@cs.com>
References: <33cc4f06 DOT 4823733 AT 192 DOT 189 DOT 54 DOT 145> <vlnYdGAm+QzzEwqo AT talula DOT demon DOT co DOT uk> <869552497 DOT 24200 AT dejanews DOT com>
Reply-To: fighteer AT cs DOT com
NNTP-Posting-Host: ppp223.cs.com
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Esa Peuha wrote:
> 
> True, but it must still allocate enough _disk space_ for it. The DPMI
> host can't know that you'll never touch that memory, and it must be able
> to page it in physical RAM if you do.
> 
> > The only thing being wasted is a few meg of your 32 bit
> > linear address space, but there's plenty of that to go around :-)
> 
> Disk space (in the swap file) is also being wasted, and this may be a
> problem.

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.

-- 
---------------------------------------------------------------------
| John M. Aldrich, aka Fighteer I  |     mailto:fighteer AT cs DOT com     |
|    *  Proud user of DJGPP!  *    |   http://www.cs.com/fighteer   |
|    ObJoke:  If Bill Gates were a robber, not only would he        |
|     shoot you, but he'd send you a bill for the bullets.          |
---------------------------------------------------------------------

- Raw text -


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