FD.io VPP  v20.01-48-g3e0dafb74
Vector Packet Processing
pmalloc.h File Reference
+ Include dependency graph for pmalloc.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  clib_pmalloc_chunk_t
 
struct  clib_pmalloc_page_t
 
struct  clib_pmalloc_arena_t
 
struct  clib_pmalloc_main_t
 

Macros

#define PMALLOC_LOG2_BLOCK_SZ   CLIB_LOG2_CACHE_LINE_BYTES
 
#define PMALLOC_BLOCK_SZ   (1 << 6)
 
#define CLIB_PMALLOC_NUMA_LOCAL   0xffffffff
 
#define CLIB_PMALLOC_ARENA_F_SHARED_MEM   (1 << 0)
 
#define CLIB_PMALLOC_F_NO_PAGEMAP   (1 << 0)
 

Functions

 STATIC_ASSERT_SIZEOF (clib_pmalloc_chunk_t, 16)
 
int clib_pmalloc_init (clib_pmalloc_main_t *pm, uword base_addr, uword size)
 
void * clib_pmalloc_alloc_aligned_on_numa (clib_pmalloc_main_t *pm, uword size, uword align, u32 numa_node)
 
void * clib_pmalloc_alloc_aligned (clib_pmalloc_main_t *pm, uword size, uword align)
 
void clib_pmalloc_free (clib_pmalloc_main_t *pm, void *va)
 
void * clib_pmalloc_create_shared_arena (clib_pmalloc_main_t *pm, char *name, uword size, u32 log2_page_sz, u32 numa_node)
 
void * clib_pmalloc_alloc_from_arena (clib_pmalloc_main_t *pm, void *arena_va, uword size, uword align)
 
static clib_error_tclib_pmalloc_last_error (clib_pmalloc_main_t *pm)
 
static u32 clib_pmalloc_get_page_index (clib_pmalloc_main_t *pm, void *va)
 
static clib_pmalloc_arena_tclib_pmalloc_get_arena (clib_pmalloc_main_t *pm, void *va)
 
static uword clib_pmalloc_get_pa (clib_pmalloc_main_t *pm, void *va)
 

Variables

format_function_t format_pmalloc
 
format_function_t format_pmalloc_map
 

Macro Definition Documentation

◆ CLIB_PMALLOC_ARENA_F_SHARED_MEM

#define CLIB_PMALLOC_ARENA_F_SHARED_MEM   (1 << 0)

Definition at line 49 of file pmalloc.h.

◆ CLIB_PMALLOC_F_NO_PAGEMAP

#define CLIB_PMALLOC_F_NO_PAGEMAP   (1 << 0)

Definition at line 64 of file pmalloc.h.

◆ CLIB_PMALLOC_NUMA_LOCAL

#define CLIB_PMALLOC_NUMA_LOCAL   0xffffffff

Definition at line 24 of file pmalloc.h.

◆ PMALLOC_BLOCK_SZ

#define PMALLOC_BLOCK_SZ   (1 << 6)

Definition at line 22 of file pmalloc.h.

◆ PMALLOC_LOG2_BLOCK_SZ

#define PMALLOC_LOG2_BLOCK_SZ   CLIB_LOG2_CACHE_LINE_BYTES

Definition at line 21 of file pmalloc.h.

Function Documentation

◆ clib_pmalloc_alloc_aligned()

void* clib_pmalloc_alloc_aligned ( clib_pmalloc_main_t pm,
uword  size,
uword  align 
)

Definition at line 515 of file pmalloc.c.

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

◆ clib_pmalloc_alloc_aligned_on_numa()

void* clib_pmalloc_alloc_aligned_on_numa ( clib_pmalloc_main_t pm,
uword  size,
uword  align,
u32  numa_node 
)

Definition at line 508 of file pmalloc.c.

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

◆ clib_pmalloc_alloc_from_arena()

void* clib_pmalloc_alloc_from_arena ( clib_pmalloc_main_t pm,
void *  arena_va,
uword  size,
uword  align 
)

Definition at line 522 of file pmalloc.c.

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

◆ clib_pmalloc_create_shared_arena()

void* clib_pmalloc_create_shared_arena ( clib_pmalloc_main_t pm,
char *  name,
uword  size,
u32  log2_page_sz,
u32  numa_node 
)

Definition at line 406 of file pmalloc.c.

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

◆ clib_pmalloc_free()

void clib_pmalloc_free ( clib_pmalloc_main_t pm,
void *  va 
)

Definition at line 552 of file pmalloc.c.

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

◆ clib_pmalloc_get_arena()

static clib_pmalloc_arena_t* clib_pmalloc_get_arena ( clib_pmalloc_main_t pm,
void *  va 
)
inlinestatic

Definition at line 142 of file pmalloc.h.

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

◆ clib_pmalloc_get_pa()

static uword clib_pmalloc_get_pa ( clib_pmalloc_main_t pm,
void *  va 
)
inlinestatic

Definition at line 149 of file pmalloc.h.

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

◆ clib_pmalloc_get_page_index()

static u32 clib_pmalloc_get_page_index ( clib_pmalloc_main_t pm,
void *  va 
)
inlinestatic

Definition at line 131 of file pmalloc.h.

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

◆ clib_pmalloc_init()

int clib_pmalloc_init ( clib_pmalloc_main_t pm,
uword  base_addr,
uword  size 
)

Definition at line 64 of file pmalloc.c.

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

◆ clib_pmalloc_last_error()

static clib_error_t* clib_pmalloc_last_error ( clib_pmalloc_main_t pm)
inlinestatic

Definition at line 125 of file pmalloc.h.

+ Here is the caller graph for this function:

◆ STATIC_ASSERT_SIZEOF()

STATIC_ASSERT_SIZEOF ( clib_pmalloc_chunk_t  ,
16   
)

Variable Documentation

◆ format_pmalloc

format_function_t format_pmalloc

Definition at line 121 of file pmalloc.h.

◆ format_pmalloc_map

format_function_t format_pmalloc_map

Definition at line 122 of file pmalloc.h.