add: catch (...) { error ("Exception thrown!\n"); exit(1); } }
context: int32 mmapTest (void *parameters)	{	void *map;	loopTestParameters *params=((loopTestParameters *)parameters);	int size=params->areaSize; // Note that this is in bytes, not in pages	while (1)		{		int fd = open ("OBOS_mmap",O_RDWR|O_CREAT,0x777);		error ("Opened file, fd = %d\n",fd);		snooze(params->initialSnooze);		error ("Creating %s mmap\n",params->name);		snooze(params->holdSnooze);		map=vm.mmap(NULL,size,PROT_WRITE|PROT_READ,MAP_SHARED,fd,0);		error ("mmap address = %p\n",map);		for (int i=0;i<size;i++)			writeByte((int32)map,i,i%256);		error ("mmapTest: writing done\n");		for (int i=0;i<size;i++)			if (i%256!=readByte((int32)map,i))				error ("ERROR! Byte at offset %d does not match: expected: %d, found: %d\n",i,i%256,readByte((int32)map,i));		error ("mmapTest: reading done\n");		snooze(params->loopSnooze); 		vm.munmap(map,size);		close(fd);		error ("Closed file, fd = %d\n",fd);		}	}