#include <stdio.h>
#include <stdlib.h>
#include <memory.h>
int main()
{
  unsigned long long size=1<<10;
  int i;
  char* big_array = malloc(size);
  for(; big_array; size *= 2) {
    free(big_array);
    big_array=malloc(size-1);
  }
  size/=4;
  big_array=malloc(size-1);
  printf("Size %d\n", size-1);
  memset(big_array, 0, size-1);
  printf("According to F. Jirsak, no swapping should occur by now\n");
  fflush(0);
  for(i = 0; i<1000; i++)
    memset(big_array, 0, size-1);
  return 0;
}

