From: sandmann AT clio DOT rice DOT edu (Charles Sandmann) Message-Id: <9804201318.AA13645@clio.rice.edu> Subject: Re: Available memory To: eliz AT is DOT elta DOT co DOT il (Eli Zaretskii) Date: Mon, 20 Apr 1998 08:18:06 -0600 (CDT) Cc: dj AT delorie DOT com, nate AT cartsys DOT com, djgpp-workers AT delorie DOT com In-Reply-To: from "Eli Zaretskii" at Apr 20, 98 04:06:18 pm Content-Type: text Precedence: bulk > Programs which call `coreleft' want to know how much memory they can > use. So I don't think it is meaningless. The DPMI calls which return > free memory are okay, but they don't include the free blocks already > sbrk'ed by the program. Adding this latter memory will get the job done, > I think. But the free blocks internally managed by malloc() are in size bins, so if the user wants a big single allocation that memory is essentially not free. If you are going to mess with it, then it ought to be something like the non-sbrked available virtual memory, rounded down to the nearest power of two (or whatever the current malloc does in that case). Or just return that value maxed with 640K ;-)