标签:
#include <stdio.h>
#include <stdlib.h>
int main ()
{
int count = 0;
while(malloc(1<<20))
{
count++;
}
printf("%d\n",count);
return 0;
}
#include<stdio.h>
#include <stdlib.h>
int main ()
{
int count = 0;
for(count = 0; ; count++)
{
if( !malloc(1<<20) )
{
break;
}
}
printf("%d\n",count);
return 0;
}
标签:
原文地址:http://blog.csdn.net/sulijuan66/article/details/45922411