maximum memory which malloc can allocate
问题 I was trying to figure out how much memory I can malloc to maximum extent on my machine (1 Gb RAM 160 Gb HD Windows platform). I read that the maximum memory malloc can allocate is limited to physical memory (on heap). Also when a program exceeds consumption of memory to a certain level, the computer stops working because other applications do not get enough memory that they require. So to confirm, I wrote a small program in C: int main(){ int *p; while(1){ p=(int *)malloc(4); if(!p)break; }