21 lines
312 B
C
21 lines
312 B
C
#include <stdio.h>
|
|
#include <unistd.h>
|
|
#include <stdlib.h>
|
|
|
|
int main(int argc, char *argv[])
|
|
{
|
|
int sz = 1524*1024*1024;
|
|
printf("%d",sz);
|
|
char * m = (char*)malloc(sz);
|
|
if(m==NULL)
|
|
{
|
|
printf("malloc failed\n");
|
|
exit(-1);
|
|
}
|
|
int i;
|
|
for(i=0; i<sz; i++) m[i]=0;
|
|
sleep(5);
|
|
// free(m);
|
|
return 0;
|
|
}
|