Date: Mon, 20 Apr 1998 09:29:21 +0300 (IDT) From: Eli Zaretskii To: Nate Eldredge cc: djgpp-workers AT delorie DOT com Subject: Re: Available memory In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk 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?