delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/09/26/15:51:07

Date: Tue, 26 Sep 2000 22:50:11 +0200
From: "Eli Zaretskii" <eliz AT is DOT elta DOT co DOT il>
Sender: halo1 AT zahav DOT net DOT il
To: rafael AT geninfor DOT com
Message-Id: <9003-Tue26Sep2000225011+0300-eliz@is.elta.co.il>
X-Mailer: Emacs 20.6 (via feedmail 8.2.emacs20_6 I) and Blat ver 1.8.5h
CC: djgpp AT delorie DOT com
In-reply-to: <8qqo03$27r$1@diana.bcn.ttd.net> (rafael@geninfor.com)
Subject: Re: negative sbrk(0)
References: <8qns3d$6g4$1 AT diana DOT bcn DOT ttd DOT net> <7263-Tue26Sep2000085518+0300-eliz AT is DOT elta DOT co DOT il> <8qprpe$l72$1 AT diana DOT bcn DOT ttd DOT net> <969973140 DOT 340672 AT shelley DOT paradise DOT net DOT nz> <8qqo03$27r$1 AT diana DOT bcn DOT ttd DOT net>
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

> From: "Rafael Garca" <rafael AT geninfor DOT com>
> Newsgroups: comp.os.msdos.djgpp
> Date: Tue, 26 Sep 2000 19:57:07 +0200
> 
> Edmund Horner <ejrh AT paradise DOT net DOT nz> escribi en el mensaje de noticias
> 969973140 DOT 340672 AT shelley DOT paradise DOT net DOT nz...
> > I understand that even if you allocate a block bigger than you have free
> > memory, the DPMI service won't actually start the virtual memory up until
> > you actually _use_ it.
> 
> O.K., but this does not make a solution. I have no chance to decide if using
> RAM o disk.

Of course, it does; of course, you do: just test the return value of
malloc, and if it's NULL, you don't have that much memory.

If you want to know about physical memory alone, that is only possible
on plain DOS, e.g. by calling __dpmi_get_free_memory_information.  (On
Windows, this function frequently lies, and even if it didn't, the
free memory could change behind your back as a result of other
programs running at the same time.)

- Raw text -


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