16 #ifndef included_palloc_h 17 #define included_palloc_h 21 #define PMALLOC_LOG2_BLOCK_SZ CLIB_LOG2_CACHE_LINE_BYTES 22 #define PMALLOC_BLOCK_SZ (1 << 6) 24 #define CLIB_PMALLOC_NUMA_LOCAL 0xffffffff 49 #define CLIB_PMALLOC_ARENA_F_SHARED_MEM (1 << 0) 64 #define CLIB_PMALLOC_F_NO_PAGEMAP (1 << 0)
Fixed length block allocator.
format_function_t format_pmalloc_map
static u32 clib_pmalloc_get_page_index(clib_pmalloc_main_t *pm, void *va)
clib_pmalloc_chunk_t * chunks
clib_pmalloc_arena_t * arenas
format_function_t format_pmalloc
STATIC_ASSERT_SIZEOF(clib_pmalloc_chunk_t, 16)
void clib_pmalloc_free(clib_pmalloc_main_t *pm, void *va)
int clib_pmalloc_init(clib_pmalloc_main_t *pm, uword base_addr, uword size)
u32 * default_arena_for_numa_node
static clib_error_t * clib_pmalloc_last_error(clib_pmalloc_main_t *pm)
clib_pmalloc_page_t * pages
void * clib_pmalloc_create_shared_arena(clib_pmalloc_main_t *pm, char *name, uword size, u32 log2_page_sz, u32 numa_node)
clib_mem_page_sz_t def_log2_page_sz
uword * chunk_index_by_va
static uword pointer_to_uword(const void *p)
void * clib_pmalloc_alloc_aligned_on_numa(clib_pmalloc_main_t *pm, uword size, uword align, u32 numa_node)
static clib_pmalloc_arena_t * clib_pmalloc_get_arena(clib_pmalloc_main_t *pm, void *va)
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
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 uword clib_pmalloc_get_pa(clib_pmalloc_main_t *pm, void *va)