|
PatchworkOS
|
#include <stdint.h>#include <stdio.h>#include <stdlib.h>#include <time.h>#include <fcntl.h>#include <sys/mman.h>#include <unistd.h>Go to the source code of this file.
Macros | |
| #define | TEST_ITERATIONS 10000 |
| #define | ERR ((uint64_t)-1) |
Functions | |
| static void | init_generic () |
| static void * | mmap_generic (size_t length) |
| static uint64_t | munmap_generic (void *addr, size_t length) |
| static void | benchmark_mmap (uint64_t pages) |
| int | main () |
|
static |
Definition at line 68 of file main.c.
References clock(), CLOCKS_PER_SEC, mmap_generic(), munmap_generic(), NULL, perror(), printf(), start(), and TEST_ITERATIONS.
Referenced by main().
| int main | ( | void | ) |
Definition at line 97 of file main.c.
References benchmark_mmap(), init_generic(), printf(), and TEST_ITERATIONS.
|
static |
Definition at line 51 of file main.c.
References mmap(), NULL, PROT_READ, and PROT_WRITE.
Referenced by benchmark_mmap().