FD.io VPP  v21.06-1-gbb7418cf9
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)
 
__clib_export 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)
 
__clib_export 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)
 
__clib_export 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)
 
__clib_export 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)
 
__clib_export void clib_pmalloc_free (clib_pmalloc_main_t *pm, void *va)
 
static u8format_pmalloc_page (u8 *s, va_list *va)
 
__clib_export u8format_pmalloc (u8 *s, va_list *va)
 
__clib_export u8format_pmalloc_map (u8 *s, va_list *va)
 

Macro Definition Documentation

◆ DEFAULT_RESERVED_MB

#define DEFAULT_RESERVED_MB   256

Definition at line 34 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 85 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 480 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()

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

Definition at line 473 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()

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

Definition at line 487 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 418 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()

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

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

◆ clib_pmalloc_free()

__clib_export void clib_pmalloc_free ( clib_pmalloc_main_t pm,
void *  va 
)

Definition at line 517 of file pmalloc.c.

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

◆ clib_pmalloc_init()

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

Definition at line 50 of file pmalloc.c.

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

◆ format_pmalloc()

__clib_export u8* format_pmalloc ( u8 s,
va_list *  va 
)

Definition at line 606 of file pmalloc.c.

+ Here is the call graph for this function:

◆ format_pmalloc_map()

__clib_export u8* format_pmalloc_map ( u8 s,
va_list *  va 
)

Definition at line 654 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 569 of file pmalloc.c.

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

◆ get_chunk()

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

Definition at line 38 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 495 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 227 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 44 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 185 of file pmalloc.c.

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