delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/04/14/04:17:56

From: "Anthony.Appleyard" <MCLSSAA2 AT fs2 DOT mt DOT umist DOT ac DOT uk>
Organization: Materials Science Centre
To: djgpp AT delorie DOT com
Date: Mon, 14 Apr 1997 08:57:59 GMT-1
Subject: Re: Growing pains with DJGPP
Reply-to: Anthony DOT Appleyard AT umist DOT ac DOT uk
Message-ID: <F0CA7778D3@fs2.mt.umist.ac.uk>

David Orme wrote:
> I managed to malloc a 128Mb array of ints, and I only have 8Mb of RAM! I was
> wondering if DJGPP double buffers or something I didn't recieve an error or
> a NULL from the malloc command.

  "John M. Aldrich" <fighteer AT cs DOT com> replied:-
> This is because under protected mode, you can use hard drive space as
> virtual memory. cwsdpmi, the free DPMI host that comes with the DJGPP
> distribution, allows the use of up to 128 MB of physical memory and 128 MB
> of virtual memory. So as long as you have enough disk space, you can happily
> go ahead and grab that 128 MB array. Of course, when you try to actually
> _use_ it, be prepared to wait a long time. Virtual memory is much slower
> than physical. ;)

   As virtual memory is much slower than physical, how can a (program which
keeps on malloc()'ing more store) find when it is starting to need to swop
parts of its heap to disk? Someone told me that DPMI can't directly tell you
how much physical RAM is stil free; but how can the program ask DPMI how much
swopping has happened recently?

- Raw text -


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