delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1998/04/20/02:32:25

Date: Mon, 20 Apr 1998 09:29:21 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Nate Eldredge <nate AT cartsys DOT com>
cc: djgpp-workers AT delorie DOT com
Subject: Re: Available memory
In-Reply-To: <Pine.LNX.3.96.980419110636.359A-100000@unixbox.bitbucket.org>
Message-ID: <Pine.SUN.3.91.980420092442.26314A-100000@is>
MIME-Version: 1.0

On Sun, 19 Apr 1998, Nate Eldredge wrote:

> 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.

Given the frequency of these questions, how about adding `coreleft' to
DJGPP v2.02?  It shouldn't be too hard to add a function to malloc.c which
will walk the free blocks list and return its size. 

We could even have `phys_coreleft' and `vm_coreleft', where the first
returns coreleft() + free_physical_memory and the second adds the
available virtual memory. 

Any takers?

- Raw text -


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