FD.io VPP  v19.04.4-rc0-5-ge88582fac
Vector Packet Processing
mheap_bootstrap.h File Reference
+ Include dependency graph for mheap_bootstrap.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  mheap_elt_t
 
struct  mheap_trace_t
 
struct  mheap_trace_main_t
 
struct  mheap_stats_t
 
struct  mheap_small_object_cache_t
 
struct  mheap_t
 

Macros

#define MHEAP_N_USER_DATA_INVALID   (0x7fffffff)
 
#define MHEAP_GROUNDED   (~0)
 
#define MHEAP_ELT_OVERHEAD_BYTES   (sizeof (mheap_elt_t) - STRUCT_OFFSET_OF (mheap_elt_t, user_data))
 
#define MHEAP_MIN_USER_DATA_BYTES   MHEAP_ELT_OVERHEAD_BYTES
 
#define MHEAP_USER_DATA_WORD_BYTES   STRUCT_SIZE_OF (mheap_elt_t, user_data[0])
 
#define MHEAP_HAVE_SMALL_OBJECT_CACHE   0
 
#define MHEAP_LOG2_N_SMALL_OBJECT_BINS   0
 
#define MHEAP_N_SMALL_OBJECT_BINS   0
 
#define MHEAP_N_BINS
 
#define MHEAP_FLAG_TRACE   (1 << 0)
 
#define MHEAP_FLAG_DISABLE_VM   (1 << 1)
 
#define MHEAP_FLAG_THREAD_SAFE   (1 << 2)
 
#define MHEAP_FLAG_SMALL_OBJECT_CACHE   (1 << 3)
 
#define MHEAP_FLAG_VALIDATE   (1 << 4)
 
#define mheap_len(v, d)   (mheap_data_bytes((v),(void *) (d) - (void *) (v)) / sizeof ((d)[0]))
 

Functions

static mheap_tmheap_header (u8 *v)
 
static u8mheap_vector (mheap_t *h)
 
static uword mheap_elt_uoffset (void *v, mheap_elt_t *e)
 
static mheap_elt_tmheap_user_pointer_to_elt (void *v)
 
static uword mheap_offset_is_valid (void *v, uword uo)
 
static mheap_elt_tmheap_elt_at_uoffset (void *v, uword uo)
 
static void * mheap_elt_data (void *v, mheap_elt_t *e)
 
static uword mheap_elt_data_bytes (mheap_elt_t *e)
 
static uword mheap_data_bytes (void *v, uword uo)
 
static mheap_elt_tmheap_next_elt (mheap_elt_t *e)
 
static mheap_elt_tmheap_prev_elt (mheap_elt_t *e)
 
static uword mheap_elts (void *v)
 
static uword mheap_max_size (void *v)
 
void mheap_put (void *v, uword offset)
 
void * mheap_get_aligned (void *v, uword size, uword align, uword align_offset, uword *offset_return)
 

Macro Definition Documentation

◆ MHEAP_ELT_OVERHEAD_BYTES

#define MHEAP_ELT_OVERHEAD_BYTES   (sizeof (mheap_elt_t) - STRUCT_OFFSET_OF (mheap_elt_t, user_data))

Definition at line 122 of file mheap_bootstrap.h.

◆ MHEAP_FLAG_DISABLE_VM

#define MHEAP_FLAG_DISABLE_VM   (1 << 1)

Definition at line 239 of file mheap_bootstrap.h.

◆ MHEAP_FLAG_SMALL_OBJECT_CACHE

#define MHEAP_FLAG_SMALL_OBJECT_CACHE   (1 << 3)

Definition at line 241 of file mheap_bootstrap.h.

◆ MHEAP_FLAG_THREAD_SAFE

#define MHEAP_FLAG_THREAD_SAFE   (1 << 2)

Definition at line 240 of file mheap_bootstrap.h.

◆ MHEAP_FLAG_TRACE

#define MHEAP_FLAG_TRACE   (1 << 0)

Definition at line 238 of file mheap_bootstrap.h.

◆ MHEAP_FLAG_VALIDATE

#define MHEAP_FLAG_VALIDATE   (1 << 4)

Definition at line 242 of file mheap_bootstrap.h.

◆ MHEAP_GROUNDED

#define MHEAP_GROUNDED   (~0)

Definition at line 76 of file mheap_bootstrap.h.

◆ MHEAP_HAVE_SMALL_OBJECT_CACHE

#define MHEAP_HAVE_SMALL_OBJECT_CACHE   0

Definition at line 167 of file mheap_bootstrap.h.

◆ mheap_len

#define mheap_len (   v,
 
)    (mheap_data_bytes((v),(void *) (d) - (void *) (v)) / sizeof ((d)[0]))

Definition at line 327 of file mheap_bootstrap.h.

◆ MHEAP_LOG2_N_SMALL_OBJECT_BINS

#define MHEAP_LOG2_N_SMALL_OBJECT_BINS   0

Definition at line 177 of file mheap_bootstrap.h.

◆ MHEAP_MIN_USER_DATA_BYTES

#define MHEAP_MIN_USER_DATA_BYTES   MHEAP_ELT_OVERHEAD_BYTES

Definition at line 125 of file mheap_bootstrap.h.

◆ MHEAP_N_BINS

#define MHEAP_N_BINS
Value:
#define MHEAP_LOG2_N_SMALL_OBJECT_BINS
#define STRUCT_BITS_OF(t, f)
Definition: clib.h:68
#define MHEAP_N_SMALL_OBJECT_BINS

Definition at line 181 of file mheap_bootstrap.h.

◆ MHEAP_N_SMALL_OBJECT_BINS

#define MHEAP_N_SMALL_OBJECT_BINS   0

Definition at line 178 of file mheap_bootstrap.h.

◆ MHEAP_N_USER_DATA_INVALID

#define MHEAP_N_USER_DATA_INVALID   (0x7fffffff)

Definition at line 75 of file mheap_bootstrap.h.

◆ MHEAP_USER_DATA_WORD_BYTES

#define MHEAP_USER_DATA_WORD_BYTES   STRUCT_SIZE_OF (mheap_elt_t, user_data[0])

Definition at line 128 of file mheap_bootstrap.h.

Function Documentation

◆ mheap_data_bytes()

static uword mheap_data_bytes ( void *  v,
uword  uo 
)
inlinestatic

Definition at line 321 of file mheap_bootstrap.h.

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

◆ mheap_elt_at_uoffset()

static mheap_elt_t* mheap_elt_at_uoffset ( void *  v,
uword  uo 
)
inlinestatic

Definition at line 302 of file mheap_bootstrap.h.

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

◆ mheap_elt_data()

static void* mheap_elt_data ( void *  v,
mheap_elt_t e 
)
inlinestatic

Definition at line 309 of file mheap_bootstrap.h.

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

◆ mheap_elt_data_bytes()

static uword mheap_elt_data_bytes ( mheap_elt_t e)
inlinestatic

Definition at line 315 of file mheap_bootstrap.h.

+ Here is the caller graph for this function:

◆ mheap_elt_uoffset()

static uword mheap_elt_uoffset ( void *  v,
mheap_elt_t e 
)
inlinestatic

Definition at line 282 of file mheap_bootstrap.h.

+ Here is the caller graph for this function:

◆ mheap_elts()

static uword mheap_elts ( void *  v)
inlinestatic

Definition at line 348 of file mheap_bootstrap.h.

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

◆ mheap_get_aligned()

void* mheap_get_aligned ( void *  v,
uword  size,
uword  align,
uword  align_offset,
uword offset_return 
)

Definition at line 643 of file mheap.c.

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

◆ mheap_header()

static mheap_t* mheap_header ( u8 v)
inlinestatic

Definition at line 270 of file mheap_bootstrap.h.

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

◆ mheap_max_size()

static uword mheap_max_size ( void *  v)
inlinestatic

Definition at line 354 of file mheap_bootstrap.h.

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

◆ mheap_next_elt()

static mheap_elt_t* mheap_next_elt ( mheap_elt_t e)
inlinestatic

Definition at line 330 of file mheap_bootstrap.h.

+ Here is the caller graph for this function:

◆ mheap_offset_is_valid()

static uword mheap_offset_is_valid ( void *  v,
uword  uo 
)
inlinestatic

Definition at line 296 of file mheap_bootstrap.h.

+ Here is the caller graph for this function:

◆ mheap_prev_elt()

static mheap_elt_t* mheap_prev_elt ( mheap_elt_t e)
inlinestatic

Definition at line 337 of file mheap_bootstrap.h.

+ Here is the caller graph for this function:

◆ mheap_put()

void mheap_put ( void *  v,
uword  offset 
)

Definition at line 771 of file mheap.c.

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

◆ mheap_user_pointer_to_elt()

static mheap_elt_t* mheap_user_pointer_to_elt ( void *  v)
inlinestatic

Definition at line 288 of file mheap_bootstrap.h.

+ Here is the caller graph for this function:

◆ mheap_vector()

static u8* mheap_vector ( mheap_t h)
inlinestatic

Definition at line 276 of file mheap_bootstrap.h.

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