FD.io VPP  v16.06
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_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_LOG2_N_SMALL_OBJECT_BINS   8
 
#define MHEAP_N_SMALL_OBJECT_BINS   (1 << MHEAP_LOG2_N_SMALL_OBJECT_BINS)
 
#define MHEAP_N_BINS
 
#define MHEAP_HAVE_SMALL_OBJECT_CACHE   0
 
#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

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

Macro Definition Documentation

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

Definition at line 84 of file mheap_bootstrap.h.

#define MHEAP_FLAG_DISABLE_VM   (1 << 1)

Definition at line 180 of file mheap_bootstrap.h.

#define MHEAP_FLAG_SMALL_OBJECT_CACHE   (1 << 3)

Definition at line 182 of file mheap_bootstrap.h.

#define MHEAP_FLAG_THREAD_SAFE   (1 << 2)

Definition at line 181 of file mheap_bootstrap.h.

#define MHEAP_FLAG_TRACE   (1 << 0)

Definition at line 179 of file mheap_bootstrap.h.

#define MHEAP_FLAG_VALIDATE   (1 << 4)

Definition at line 183 of file mheap_bootstrap.h.

#define MHEAP_HAVE_SMALL_OBJECT_CACHE   0

Definition at line 149 of file mheap_bootstrap.h.

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

Definition at line 245 of file mheap_bootstrap.h.

#define MHEAP_LOG2_N_SMALL_OBJECT_BINS   8

Definition at line 122 of file mheap_bootstrap.h.

#define MHEAP_MIN_USER_DATA_BYTES   MHEAP_ELT_OVERHEAD_BYTES

Definition at line 87 of file mheap_bootstrap.h.

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

Definition at line 125 of file mheap_bootstrap.h.

#define MHEAP_N_SMALL_OBJECT_BINS   (1 << MHEAP_LOG2_N_SMALL_OBJECT_BINS)

Definition at line 123 of file mheap_bootstrap.h.

#define MHEAP_N_USER_DATA_INVALID   (0x7fffffff)

Definition at line 56 of file mheap_bootstrap.h.

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

Definition at line 90 of file mheap_bootstrap.h.

Function Documentation

always_inline uword mheap_data_bytes ( void v,
uword  uo 
)

Definition at line 239 of file mheap_bootstrap.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

always_inline mheap_elt_t* mheap_elt_at_uoffset ( void v,
uword  uo 
)

Definition at line 227 of file mheap_bootstrap.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

always_inline void* mheap_elt_data ( void v,
mheap_elt_t e 
)

Definition at line 233 of file mheap_bootstrap.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

always_inline uword mheap_elt_data_bytes ( mheap_elt_t e)

Definition at line 236 of file mheap_bootstrap.h.

+ Here is the caller graph for this function:

always_inline uword mheap_elt_uoffset ( void v,
mheap_elt_t e 
)

Definition at line 216 of file mheap_bootstrap.h.

+ Here is the caller graph for this function:

always_inline uword mheap_elts ( void v)

Definition at line 263 of file mheap_bootstrap.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 621 of file mheap.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

always_inline mheap_t* mheap_header ( u8 v)

Definition at line 210 of file mheap_bootstrap.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

always_inline uword mheap_max_size ( void v)

Definition at line 266 of file mheap_bootstrap.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

always_inline mheap_elt_t* mheap_next_elt ( mheap_elt_t e)

Definition at line 247 of file mheap_bootstrap.h.

+ Here is the caller graph for this function:

always_inline uword mheap_offset_is_valid ( void v,
uword  uo 
)

Definition at line 224 of file mheap_bootstrap.h.

+ Here is the caller graph for this function:

always_inline mheap_elt_t* mheap_prev_elt ( mheap_elt_t e)

Definition at line 253 of file mheap_bootstrap.h.

+ Here is the caller graph for this function:

void mheap_put ( void v,
uword  offset 
)

Definition at line 728 of file mheap.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

always_inline mheap_elt_t* mheap_user_pointer_to_elt ( void v)

Definition at line 219 of file mheap_bootstrap.h.

+ Here is the caller graph for this function:

always_inline u8* mheap_vector ( mheap_t h)

Definition at line 213 of file mheap_bootstrap.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function: