www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/11/17/18:45:56

From: "Seth Hill" <ferris AT proaxis DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: How much free memory ?
Date: 17 Nov 97 14:48:32 -0800
Organization: All USENET -- http://www.Supernews.com
Lines: 30
Message-ID: <B09609D2-18267C@206.163.153.81>
References: <199711170321 DOT TAA02316 AT adit DOT ap DOT net>
NNTP-Posting-Host: 21456 AT 206 DOT 163 DOT 153 DOT 81
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

On Sun, Nov 16, 1997 7:21 PM, Nate Eldredge <mailto:eldredge AT ap DOT net> wrote:
>This may be misleading, since the amount of memory remaining may be much
>greater than the largest available block. (You might get a value of
`10000',
>but be able to `malloc(5000)' many many times.) Also, it isn't even the
>largest amount you can `malloc()', because of `malloc()'s overhead. So you
>can use that function if you want, but IMHO, the only thing that has any
>meaning is whether or not `malloc()' returns NULL.
>
>Nate Eldredge
>eldredge AT ap DOT net
>
>

Yes, of course, the dpmi memory info should not be an excuse for not
checking whether malloc() returns NULL, but, if you wanted to tell the
user: "Estimated Memory Availble: xxxx" or some such thing, it is rather
useful.

Besides that, I haven't seen any other routines that would yeild a more
accurate value.

_____________________________________________________________________
                 Seth Hill | ferris AT proaxis DOT com
      Troposphere Software | http://www.proaxis.com/~ferris/software/

"What are we going to do tomorrow night, Brain?"
"The same thing we do every night, Pinky - Try to take over the world!


- Raw text -


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