All pastes #885467 Raw Edit

Untitled

public text v1 · immutable
#885467 ·published 2008-01-30 22:38 UTC
rendered paste body
int 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;
}