#include <sys/types.h>
#include <sys/mman.h>
#include <fcntl.h>
#include <stdio.h>

const size_t size = 2097152000;
int main(void)
{
	int b = open("blammo",O_RDWR, 0777);
	char * foo = mmap(0, size,PROT_READ | PROT_WRITE, MAP_SHARED, b,0);
	for(unsigned int j=4 ; j<1005 ; j++)
	{
		printf("Pass %d\n",j - 4);
		for(unsigned int i=j ; i<(size - sizeof(int)) ; i+=4096)
		{
			*(int*)(foo + i - 4) += *(int*)(foo + i);
		}	
	}
	return 0;
}
