FD.io VPP  v20.05.1-6-gf53edbc3b
Vector Packet Processing
heap.c File Reference
+ Include dependency graph for heap.c:

Go to the source code of this file.

Functions

static heap_elt_telt_at (heap_header_t *h, uword i)
 
static heap_elt_tlast (heap_header_t *h)
 
static heap_elt_tfirst (heap_header_t *h)
 
static uword size_to_bin (uword size)
 
static uword bin_to_size (uword bin)
 
static void elt_delete (heap_header_t *h, heap_elt_t *e)
 
static void elt_insert_before (heap_header_t *h, heap_elt_t *e, heap_elt_t *new)
 
static void elt_insert_after (heap_header_t *h, heap_elt_t *e, heap_elt_t *new)
 
static heap_elt_telt_new (heap_header_t *h)
 
static u32elt_data (void *v, heap_elt_t *e)
 
static void set_free_elt (void *v, heap_elt_t *e, uword fi)
 
static uword get_free_elt (void *v, heap_elt_t *e, uword *bin_result)
 
static void remove_free_block (void *v, uword b, uword i)
 
static heap_elt_tsearch_free_list (void *v, uword size)
 
static void combine_free_blocks (void *v, heap_elt_t *e0, heap_elt_t *e1)
 
static void dealloc_elt (void *v, heap_elt_t *e)
 
void heap_dealloc (void *v, uword handle)
 
uword heap_len (void *v, word handle)
 
uword heap_bytes (void *v)
 
static u8debug_elt (u8 *s, void *v, word i, word n)
 
u8format_heap (u8 *s, va_list *va)
 
void heap_validate (void *v)
 

Function Documentation

◆ bin_to_size()

static uword bin_to_size ( uword  bin)
inlinestatic

Definition at line 97 of file heap.c.

◆ combine_free_blocks()

static void combine_free_blocks ( void *  v,
heap_elt_t e0,
heap_elt_t e1 
)
static

Definition at line 526 of file heap.c.

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

◆ dealloc_elt()

static void dealloc_elt ( void *  v,
heap_elt_t e 
)
inlinestatic

Definition at line 360 of file heap.c.

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

◆ debug_elt()

static u8* debug_elt ( u8 s,
void *  v,
word  i,
word  n 
)
static

Definition at line 653 of file heap.c.

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

◆ elt_at()

static heap_elt_t* elt_at ( heap_header_t h,
uword  i 
)
inlinestatic

Definition at line 46 of file heap.c.

+ Here is the caller graph for this function:

◆ elt_data()

static u32* elt_data ( void *  v,
heap_elt_t e 
)
inlinestatic

Definition at line 213 of file heap.c.

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

◆ elt_delete()

static void elt_delete ( heap_header_t h,
heap_elt_t e 
)
static

Definition at line 110 of file heap.c.

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

◆ elt_insert_after()

static void elt_insert_after ( heap_header_t h,
heap_elt_t e,
heap_elt_t new 
)
inlinestatic

Definition at line 175 of file heap.c.

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

◆ elt_insert_before()

static void elt_insert_before ( heap_header_t h,
heap_elt_t e,
heap_elt_t new 
)
inlinestatic

Definition at line 150 of file heap.c.

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

◆ elt_new()

static heap_elt_t* elt_new ( heap_header_t h)
inlinestatic

Definition at line 196 of file heap.c.

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

◆ first()

static heap_elt_t* first ( heap_header_t h)
inlinestatic

Definition at line 59 of file heap.c.

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

◆ format_heap()

u8* format_heap ( u8 s,
va_list *  va 
)

Definition at line 698 of file heap.c.

+ Here is the call graph for this function:

◆ get_free_elt()

static uword get_free_elt ( void *  v,
heap_elt_t e,
uword bin_result 
)
inlinestatic

Definition at line 240 of file heap.c.

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

◆ heap_bytes()

uword heap_bytes ( void *  v)

Definition at line 632 of file heap.c.

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

◆ heap_dealloc()

void heap_dealloc ( void *  v,
uword  handle 
)

Definition at line 500 of file heap.c.

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

◆ heap_len()

uword heap_len ( void *  v,
word  handle 
)

Definition at line 601 of file heap.c.

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

◆ heap_validate()

void heap_validate ( void *  v)

Definition at line 726 of file heap.c.

+ Here is the call graph for this function:

◆ last()

static heap_elt_t* last ( heap_header_t h)
inlinestatic

Definition at line 53 of file heap.c.

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

◆ remove_free_block()

static void remove_free_block ( void *  v,
uword  b,
uword  i 
)
inlinestatic

Definition at line 263 of file heap.c.

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

◆ search_free_list()

static heap_elt_t* search_free_list ( void *  v,
uword  size 
)
static

Definition at line 283 of file heap.c.

+ Here is the call graph for this function:

◆ set_free_elt()

static void set_free_elt ( void *  v,
heap_elt_t e,
uword  fi 
)
inlinestatic

Definition at line 220 of file heap.c.

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

◆ size_to_bin()

static uword size_to_bin ( uword  size)
inlinestatic

Definition at line 73 of file heap.c.

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