Saturday, 15 September 2012

c - How size allocted by malloc is depends on RAM? -



c - How size allocted by malloc is depends on RAM? -

this question has reply here:

maximum memory malloc can allocate 7 answers while(1){ static int i=1; int *p; if(p=malloc(1024*1024)) //assigning 1 mb space printf("%d.",i++); else exit(0); }

if above programme run in scheme having 1gb ram , in scheme having 4gb ram difference in time , value of ???

we don't know, since it's implementation detail. c standard says nil this.

c memory-management malloc

No comments:

Post a Comment