Subj : Questions about large memory allocation...? To : borland.public.cpp.borlandcpp From : mujeebrm Date : Wed Sep 14 2005 12:27 am /* prac.c, compact memory model used , bc 5.02, win xp, how can i allocate more than 70000 and show it printed 0 to 69999 */ #include main() { unsigned int *p=0,n=0; /* compact memory model used : pointer auto coverted to unsigned int far *p=0 */ p = (unsigned int *) malloc(65535*sizeof(unsigned int ) ); /* this works */ if(!p) { puts("out a memory!"); exit(1); } printf("%p", p); for(n=0;n<65535;n++) *(p+n) = n; for(n=0; n<65535; n++) printf(" %u\n ", *(p+n) ); /* it doesnt show count from 0 but 32768 onwards, why, as such, i want it to start at 0 onwards */ free(p); getch(); } .