Subject: sbrk behaviour..!
To: None <port-i386@NetBSD.ORG>
From: BALA <BKUMARES.IN.ORACLE.COM.ofcmail@in.oracle.com>
List: port-i386
Date: 07/21/1997 20:27:00
/* my_prog.c */
#include <stdio.h>
#include <sys/types.h>
main() {
char *str;
str=sbrk(0);
printf("%d \n",str);
str=sbrk(0);
printf("%d \n",str);
}
/* end of my_prog.c */
My problem is I get different values printed for the two printf statements.
If I continue to do 'sbrk(0)' and print the base address its the same as what
got printed the second time.
Why is this ?
Thanks for your help!
cheers,
Bala.