FD.io VPP  v19.04-6-g6f05f72
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

#define CLIB_PMALLOC_ARENA_F_SHARED_MEM   (1 << 0)

Definition at line 49 of file pmalloc.h.

#define CLIB_PMALLOC_F_NO_PAGEMAP   (1 << 0)

Definition at line 64 of file pmalloc.h.

#define CLIB_PMALLOC_NUMA_LOCAL   0xffffffff

Definition at line 24 of file pmalloc.h.

#define PMALLOC_BLOCK_SZ   (1 << 6)

Definition at line 22 of file pmalloc.h.

#define PMALLOC_LOG2_BLOCK_SZ   CLIB_LOG2_CACHE_LINE_BYTES

Definition at line 21 of file pmalloc.h.

Function Documentation

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

Definition at line 528 of file pmalloc.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 521 of file pmalloc.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 535 of file pmalloc.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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 419 of file pmalloc.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void clib_pmalloc_free ( clib_pmalloc_main_t pm,
void *  va 
)

Definition at line 565 of file pmalloc.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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:

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:

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:

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:

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 ( clib_pmalloc_chunk_t  ,
16   
)

Variable Documentation

format_function_t format_pmalloc

Definition at line 121 of file pmalloc.h.

format_function_t format_pmalloc_map

Definition at line 122 of file pmalloc.h.