Date: Sun, 19 Apr 1998 11:10:37 -0700 (PDT) From: Nate Eldredge To: Rodney McConnell cc: djgpp AT delorie DOT com Subject: Re: Available memory In-Reply-To: <6h9n49$4rm$1@news.enterprise.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk 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