16 unsigned char *p = (
unsigned char *) 0x10000000;
20 CHECK ((handle =
open (argv[1])) > 1,
"open \"%s\"", argv[1]);
int main(int argc UNUSED, char *argv[])
const char * test_name
Mmaps a 128 kB file "sorts" the bytes in it, using quick sort, a multi-pass divide and conquer algori...
#define UNUSED
GCC lets us add "attributes" to functions, function parameters, etc.
mapid_t mmap(int fd, void *addr)
Project 3 and optionally project 4.
int open(const char *file)
#define CHECK(SUCCESS,...)
Takes an expression to test for SUCCESS and a message, which may include printf-style arguments.
void qsort_bytes(unsigned char *buf, size_t size)
Sorts the SIZE bytes in BUF into nondecreasing order, using the quick-sort algorithm.