Date: Wed, 5 Jul 2000 19:16:38 +0300 (IDT) From: Eli Zaretskii X-Sender: eliz AT is To: djgpp AT delorie DOT com Subject: Re: Amount of Memory used by a djgpp program. In-Reply-To: <396352ca.29983468@news.huji.ac.il> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Wed, 5 Jul 2000, Hbar wrote: > Thnx, I'm using this method, but sometimes I'm getting proper numbers > and sometimes not. Am I casting wrong? Should the *mem pointers be > void? This is my code: > > char *memi,*memf; > memi=(char *)sbrk(0); > //my program > memf=(char *)sbrk(0); > printf("\nTotal memory used %dKb\n",((unsigned > long)(memf-memi))/1024); It would help *tremendously* if you say what are the ``improper'' numbers that you get sometimes. I'm not good enough at guessing something that happens out of my sight ;-)