Date: Tue, 25 Aug 1998 15:18:03 +0300 (IDT) From: Eli Zaretskii To: Cláudio André Heckler cc: djgpp AT delorie DOT com Subject: Re: Need to know free memory In-Reply-To: <35E15D6D.822A850A@mat.ufrgs.br> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Content-Transfer-Encoding: 8bit Precedence: bulk On Mon, 24 Aug 1998, Cláudio André Heckler wrote: > This way, when I free memory, I don't see any change in > the value returned by _go32_dpmi_get_free_memory_information. > So, how can I calculate the REAL amount of free memory that I > can use ? The question is: what would you like your program to do when it runs out of physical RAM? Given the answer to that, a solution to your dilemma could probably be found. For example, if all you want is to print a message and exit, or prevent the user from doing something, then disabling virtual memory and checking values returned by `malloc' and friends against NULL would be sufficient.