FD.io VPP  v20.05.1-5-g09f167997
Vector Packet Processing
pmalloc.c File Reference
+ Include dependency graph for pmalloc.c:

Go to the source code of this file.

Macros

#define DEFAULT_RESERVED_MB   256
 

Functions

static clib_pmalloc_chunk_tget_chunk (clib_pmalloc_page_t *pp, u32 index)
 
static uword pmalloc_size2pages (uword size, u32 log2_page_sz)
 
static int pmalloc_validate_numa_node (u32 *numa_node)
 
int clib_pmalloc_init (clib_pmalloc_main_t *pm, uword base_addr, uword size)
 
static void * alloc_chunk_from_page (clib_pmalloc_main_t *pm, clib_pmalloc_page_t *pp, u32 n_blocks, u32 block_align, u32 numa_node)
 
static void pmalloc_update_lookup_table (clib_pmalloc_main_t *pm, u32 first, u32 count)
 
static clib_pmalloc_page_tpmalloc_map_pages (clib_pmalloc_main_t *pm, clib_pmalloc_arena_t *a, u32 numa_node, u32 n_pages)
 
void * clib_pmalloc_create_shared_arena (clib_pmalloc_main_t *pm, char *name, uword size, u32 log2_page_sz, u32 numa_node)
 
static void * clib_pmalloc_alloc_inline (clib_pmalloc_main_t *pm, clib_pmalloc_arena_t *a, uword size, uword align, u32 numa_node)
 
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_alloc_from_arena (clib_pmalloc_main_t *pm, void *arena_va, uword size, uword align)
 
static int pmalloc_chunks_mergeable (clib_pmalloc_arena_t *a, clib_pmalloc_page_t *pp, u32 ci1, u32 ci2)
 
void clib_pmalloc_free (clib_pmalloc_main_t *pm, void *va)
 
static u8format_log2_page_size (u8 *s, va_list *va)
 
static u8format_pmalloc_page (u8 *s, va_list *va)
 
u8format_pmalloc (u8 *s, va_list *va)
 
u8format_pmalloc_map (u8 *s, va_list *va)
 

Macro Definition Documentation

◆ DEFAULT_RESERVED_MB

#define DEFAULT_RESERVED_MB   256

Definition at line 36 of file pmalloc.c.

Function Documentation

◆ alloc_chunk_from_page()

static void* alloc_chunk_from_page ( clib_pmalloc_main_t pm,
clib_pmalloc_page_t pp,
u32  n_blocks,
u32  block_align,
u32  numa_node 
)
inlinestatic

Definition at line 100 of file pmalloc.c.

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

◆ clib_pmalloc_alloc_aligned()

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

Definition at line 498 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 491 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 505 of file pmalloc.c.

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

◆ clib_pmalloc_alloc_inline()

static void* clib_pmalloc_alloc_inline ( clib_pmalloc_main_t pm,
clib_pmalloc_arena_t a,
uword  size,
uword  align,
u32  numa_node 
)
inlinestatic

Definition at line 436 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 389 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 535 of file pmalloc.c.

+ 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:

◆ format_log2_page_size()

static u8* format_log2_page_size ( u8 s,
va_list *  va 
)
static

Definition at line 587 of file pmalloc.c.

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

◆ format_pmalloc()

u8* format_pmalloc ( u8 s,
va_list *  va 
)

Definition at line 642 of file pmalloc.c.

+ Here is the call graph for this function:

◆ format_pmalloc_map()

u8* format_pmalloc_map ( u8 s,
va_list *  va 
)

Definition at line 690 of file pmalloc.c.

+ Here is the call graph for this function:

◆ format_pmalloc_page()

static u8* format_pmalloc_page ( u8 s,
va_list *  va 
)
static

Definition at line 605 of file pmalloc.c.

+ Here is the call graph for this function:

◆ get_chunk()

static clib_pmalloc_chunk_t* get_chunk ( clib_pmalloc_page_t pp,
u32  index 
)
inlinestatic

Definition at line 40 of file pmalloc.c.

+ Here is the caller graph for this function:

◆ pmalloc_chunks_mergeable()

static int pmalloc_chunks_mergeable ( clib_pmalloc_arena_t a,
clib_pmalloc_page_t pp,
u32  ci1,
u32  ci2 
)
inlinestatic

Definition at line 513 of file pmalloc.c.

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

◆ pmalloc_map_pages()

static clib_pmalloc_page_t* pmalloc_map_pages ( clib_pmalloc_main_t pm,
clib_pmalloc_arena_t a,
u32  numa_node,
u32  n_pages 
)
inlinestatic

Definition at line 242 of file pmalloc.c.

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

◆ pmalloc_size2pages()

static uword pmalloc_size2pages ( uword  size,
u32  log2_page_sz 
)
inlinestatic

Definition at line 46 of file pmalloc.c.

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

◆ pmalloc_update_lookup_table()

static void pmalloc_update_lookup_table ( clib_pmalloc_main_t pm,
u32  first,
u32  count 
)
static

Definition at line 200 of file pmalloc.c.

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

◆ pmalloc_validate_numa_node()

static int pmalloc_validate_numa_node ( u32 numa_node)
inlinestatic

Definition at line 52 of file pmalloc.c.

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