FD.io VPP  v18.07.1-13-g909ba93
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

#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.

#define MHEAP_FLAG_DISABLE_VM   (1 << 1)

Definition at line 239 of file mheap_bootstrap.h.

#define MHEAP_FLAG_SMALL_OBJECT_CACHE   (1 << 3)

Definition at line 241 of file mheap_bootstrap.h.

#define MHEAP_FLAG_THREAD_SAFE   (1 << 2)

Definition at line 240 of file mheap_bootstrap.h.

#define MHEAP_FLAG_TRACE   (1 << 0)

Definition at line 238 of file mheap_bootstrap.h.

#define MHEAP_FLAG_VALIDATE   (1 << 4)

Definition at line 242 of file mheap_bootstrap.h.

#define MHEAP_GROUNDED   (~0)

Definition at line 76 of file mheap_bootstrap.h.

#define MHEAP_HAVE_SMALL_OBJECT_CACHE   0

Definition at line 167 of file mheap_bootstrap.h.

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

Definition at line 327 of file mheap_bootstrap.h.

#define MHEAP_LOG2_N_SMALL_OBJECT_BINS   0

Definition at line 177 of file mheap_bootstrap.h.

#define MHEAP_MIN_USER_DATA_BYTES   MHEAP_ELT_OVERHEAD_BYTES

Definition at line 125 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 181 of file mheap_bootstrap.h.

#define MHEAP_N_SMALL_OBJECT_BINS   0

Definition at line 178 of file mheap_bootstrap.h.

#define MHEAP_N_USER_DATA_INVALID   (0x7fffffff)

Definition at line 75 of file mheap_bootstrap.h.

#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

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:

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:

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:

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:

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:

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:

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:

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:

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:

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:

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:

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:

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:

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:

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: