Message-ID: <005801be5bcb$307e60f0$2bfba0cc@hclt.com> From: "Kannan. S" To: Subject: Re: free RAM available Date: Fri, 19 Feb 1999 11:16:25 +0530 MIME-Version: 1.0 Content-Type: text/plain; charset="_autodetect_all" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.0810.800 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.0810.800 Reply-To: djgpp AT delorie DOT com No.No. No . NO... Please refrain from doing that. There are DPMI functions that can do the job for you. Look at FAQ Section 15.2 ----- Original Message ----- From: To: Sent: Friday, February 19, 1999 1:15 AM Subject: Re: free RAM available >>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.: > >char *p; >long l = 0; >do >{ > p = malloc(1024); > if (p) l += 1024; >} while (p); > >printf("Approximently % d megs of memory", l / 1024); > >Regards- >Brandon Tallent >