Judger/tests/test_src/integration/memory2.c
2016-10-24 23:01:55 +08:00

18 lines
281 B
C

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main()
{
int size = 256 * 1024 * 1024;
int *a = NULL;
a = (int *)malloc(size);
if (a == NULL) {
return 1;
}
else {
memset(a, 1, size);
free(a);
return 0;
}
}