PatchworkOS  3984a1d
A non-POSIX operating system.
Loading...
Searching...
No Matches
main.c File Reference
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <fcntl.h>
#include <sys/mman.h>
#include <unistd.h>
Include dependency graph for main.c:

Go to the source code of this file.

Macros

#define MMAP_ITER   10000
 
#define GETPID_ITER   100000
 
#define ERR   ((uint64_t)-1)
 

Functions

static void init_generic ()
 
static voidmmap_generic (size_t length)
 
static uint64_t munmap_generic (void *addr, size_t length)
 
static void benchmark_mmap (uint64_t pages)
 
int main ()
 

Macro Definition Documentation

◆ MMAP_ITER

#define MMAP_ITER   10000

Definition at line 6 of file main.c.

◆ GETPID_ITER

#define GETPID_ITER   100000

Definition at line 7 of file main.c.

◆ ERR

#define ERR   ((uint64_t)-1)

Definition at line 70 of file main.c.

Function Documentation

◆ init_generic()

static void init_generic ( )
static

Definition at line 72 of file main.c.

Here is the caller graph for this function:

◆ mmap_generic()

static void * mmap_generic ( size_t  length)
static

Definition at line 77 of file main.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ munmap_generic()

static uint64_t munmap_generic ( void addr,
size_t  length 
)
static

Definition at line 87 of file main.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ benchmark_mmap()

static void benchmark_mmap ( uint64_t  pages)
static

Definition at line 94 of file main.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ main()

int main ( void  )

Definition at line 123 of file main.c.

Here is the call graph for this function: