Mail Archives: djgpp/2000/07/05/12:17:19
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 ;-)
- Raw text -