From: Ludvig Larsson Newsgroups: comp.os.msdos.djgpp Subject: Re: free RAM available Date: Tue, 23 Feb 1999 02:36:14 +0100 Organization: Faas-Goldhart Lines: 16 Message-ID: <36D2060E.190E@club-internet.fr> References: <3ac7af8c DOT 36cc6dcd AT aol DOT com> NNTP-Posting-Host: toulouse-4-58.club-internet.fr Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: front6.grolier.fr 919733567 16290 194.158.125.58 (23 Feb 1999 01:32:47 GMT) NNTP-Posting-Date: 23 Feb 1999 01:32:47 GMT X-Mailer: Mozilla 3.01C-CLUB (Win95; I) To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Apester000 AT aol DOT com wrote: > > >Hi, > > > >How can I get the free RAM available ? > > An easy (while not entirely accurate way) is just to make a little loop > allocating memory until malloc failes. i.e.: I think the DPMI will just continue to allocate virtual memory(on disc) until there are no more which will provide an answer containing a total of your free memorysize and your discs free memory size. I guess that it also might trouble an OS which depends on virtual memory(ex Win95 etc..) Ludvig Larsson