Untitled
public text v1 · immutableint main(void)
{
struct rlimit lim;
int i;
if(getrlimit(RLIMIT_AS, &lim) == -1) return 1;
lim.rlim_cur = lim.rlim_max = 100 * 1024;
if(setrlimit(RLIMIT_AS, &lim) == -1) return 2;
for (i=0; i<50000; i++)
malloc(1000);
printf("%d\n",42);
return 0;
}