www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/04/19/14:35:46

Date: Sun, 19 Apr 1998 11:10:37 -0700 (PDT)
From: Nate Eldredge <nate AT cartsys DOT com>
To: Rodney McConnell <rd AT enterprise DOT net>
cc: djgpp AT delorie DOT com
Subject: Re: Available memory
In-Reply-To: <6h9n49$4rm$1@news.enterprise.net>
Message-ID: <Pine.LNX.3.96.980419110636.359A-100000@unixbox.bitbucket.org>
MIME-Version: 1.0

On Sat, 18 Apr 1998, Rodney McConnell wrote:

> Hi.
> 
> I have just really got into djgpp after using borlandc, What I can't
> figure out is how to tell how much memory is available. In Bc
> farcoreleft() or coreleft() would return how much. What's the djgpp
> equivelent?

In brief, there isn't really a good way.
`__dpmi_get_free_memory_information' will give you some statistics, but
for a variety of reasons, they may not always reflect exactly what you can
do.  AFAIK, all you know is that you can *probably* allocate the amount
that function says is free.  The only way to know for sure is to call
`malloc' and see if it returns NULL.

Nate Eldredge
nate AT cartsys DOT com

- Raw text -


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