FD.io VPP
v21.01.1
Vector Packet Processing
|
Simple first-fit virtual space allocator. More...
Go to the source code of this file.
Functions | |
void | clib_valloc_add_chunk (clib_valloc_main_t *vam, clib_valloc_chunk_t *template) |
Add a chunk of memory to a virtual allocation arena. More... | |
__clib_export void | clib_valloc_init (clib_valloc_main_t *vam, clib_valloc_chunk_t *template, int need_lock) |
Initialize a virtual memory allocation arena. More... | |
__clib_export uword | clib_valloc_alloc (clib_valloc_main_t *vam, uword size, int os_out_of_memory_on_failure) |
Allocate virtual space. More... | |
__clib_export uword | clib_valloc_free (clib_valloc_main_t *vam, uword baseva) |
Free virtual space. More... | |
u8 * | format_valloc (u8 *s, va_list *va) |
format a virtual allocation arena (varargs) More... | |
Simple first-fit virtual space allocator.
Definition in file valloc.c.
void clib_valloc_add_chunk | ( | clib_valloc_main_t * | vam, |
clib_valloc_chunk_t * | template | ||
) |
Add a chunk of memory to a virtual allocation arena.
vam | - clib_valloc_main_t * pointer to the allocation arena |
template | - clib_valloc_chunk_t * pointer to a template chunk which describes the virtual address range to add |
Definition at line 33 of file valloc.c.
__clib_export uword clib_valloc_alloc | ( | clib_valloc_main_t * | vam, |
uword | size, | ||
int | os_out_of_memory_on_failure | ||
) |
Allocate virtual space.
vam | - clib_valloc_main_t * pointer to the allocation arena |
size | - u64 number of bytes to allocate - 1=> panic on allocation failure |
Definition at line 151 of file valloc.c.
__clib_export uword clib_valloc_free | ( | clib_valloc_main_t * | vam, |
uword | baseva | ||
) |
Free virtual space.
vam | - clib_valloc_main_t * pointer to the allocation arena |
baseva | - uword base virtual address of the returned space |
Definition at line 228 of file valloc.c.
__clib_export void clib_valloc_init | ( | clib_valloc_main_t * | vam, |
clib_valloc_chunk_t * | template, | ||
int | need_lock | ||
) |
Initialize a virtual memory allocation arena.
vam | - clib_valloc_main_t * pointer to the arena to initialize |
template | - clib_valloc_chunk_t * pointer to a template chunk which describes the initial virtual address range |
Definition at line 129 of file valloc.c.
format a virtual allocation arena (varargs)
vam | - clib_valloc_main_t pointer to the arena to format |
verbose | - int - verbosity level |
Definition at line 313 of file valloc.c.