12#define SIZE (128 * 1024)
14static char *
buf = (
char *) 0x10000000;
24 CHECK ((handle =
open (
"buffer")) > 1,
"open \"buffer\"");
28 for (i = 0; i <
SIZE; i++)
33 for (i = 0; i < 10; i++)
unsigned long cksum(const void *b_, size_t n)
This is the algorithm used by the Posix ‘cksum’ utility.
mapid_t mmap(int fd, void *addr)
Project 3 and optionally project 4.
bool create(const char *file, unsigned initial_size)
int open(const char *file)
void msg(const char *format,...)
#define CHECK(SUCCESS,...)
Takes an expression to test for SUCCESS and a message, which may include printf-style arguments.
#define SIZE
Creates a 128 kB file and repeatedly shuffles data in it through a memory mapping.
void test_main(void)
tests/main.h
static void shuffle(struct value[], size_t)