ARGOBOTS  dce6e727ffc4ca5b3ffc04cb9517c6689be51ec5
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

◆ ABTU_LP_PROTS

#define ABTU_LP_PROTS   (PROT_READ | PROT_WRITE)

Definition at line 11 of file largepage.c.

◆ ABTU_LP_USE_HUGEPAGE

#define ABTU_LP_USE_HUGEPAGE   0

Definition at line 30 of file largepage.c.

◆ ABTU_LP_USE_MMAP

#define ABTU_LP_USE_MMAP   0

Definition at line 20 of file largepage.c.

Function Documentation

◆ ABTU_alloc_largepage()

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.

◆ ABTU_free_largepage()

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

Definition at line 132 of file largepage.c.

◆ ABTU_is_supported_largepage_type()

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.

◆ mmap_free()

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().

◆ mmap_hugepage()

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().

◆ mmap_regular()

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().