ARGOBOTS  66b1c39742507d8df30e8d28c54839b961a14814
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
Macros | Functions
largepage.c File Reference
#include <sys/types.h>
#include <sys/mman.h>
#include "abti.h"
Include dependency graph for largepage.c:

Go to the source code of this file.

Macros

#define ABTU_LP_PROTS   (PROT_READ | PROT_WRITE)
 
#define ABTU_LP_USE_MMAP   0
 
#define ABTU_LP_USE_HUGEPAGE   0
 

Functions

static void * mmap_regular (size_t size)
 
static void * mmap_hugepage (size_t size)
 
static void mmap_free (void *p_page, size_t size)
 
int ABTU_is_supported_largepage_type (size_t size, size_t alignment_hint, ABTU_MEM_LARGEPAGE_TYPE requested)
 
ABTU_ret_err int ABTU_alloc_largepage (size_t size, size_t alignment_hint, const ABTU_MEM_LARGEPAGE_TYPE *requested_types, int num_requested_types, ABTU_MEM_LARGEPAGE_TYPE *p_actual, void **p_ptr)
 
void ABTU_free_largepage (void *ptr, size_t size, ABTU_MEM_LARGEPAGE_TYPE type)
 

Macro Definition Documentation

#define ABTU_LP_PROTS   (PROT_READ | PROT_WRITE)

Definition at line 11 of file largepage.c.

Referenced by mmap_hugepage(), and mmap_regular().

#define ABTU_LP_USE_HUGEPAGE   0

Definition at line 30 of file largepage.c.

#define ABTU_LP_USE_MMAP   0

Definition at line 20 of file largepage.c.

Function Documentation

ABTU_ret_err int ABTU_alloc_largepage ( size_t  size,
size_t  alignment_hint,
const ABTU_MEM_LARGEPAGE_TYPE requested_types,
int  num_requested_types,
ABTU_MEM_LARGEPAGE_TYPE p_actual,
void **  p_ptr 
)

Definition at line 90 of file largepage.c.

void ABTU_free_largepage ( void *  ptr,
size_t  size,
ABTU_MEM_LARGEPAGE_TYPE  type 
)

Definition at line 132 of file largepage.c.

int ABTU_is_supported_largepage_type ( size_t  size,
size_t  alignment_hint,
ABTU_MEM_LARGEPAGE_TYPE  requested 
)

Definition at line 59 of file largepage.c.

static void mmap_free ( void *  p_page,
size_t  size 
)
static

Definition at line 53 of file largepage.c.

Referenced by ABTU_free_largepage(), and ABTU_is_supported_largepage_type().

static void* mmap_hugepage ( size_t  size)
static

Definition at line 43 of file largepage.c.

Referenced by ABTU_alloc_largepage(), and ABTU_is_supported_largepage_type().

static void* mmap_regular ( size_t  size)
static

Definition at line 33 of file largepage.c.

Referenced by ABTU_alloc_largepage(), and ABTU_is_supported_largepage_type().