Go to the source code of this file.
|
#define | VERBOSE1(fmt, args...) |
|
#define | VERBOSE2(fmt, args...) |
|
#define | VERBOSE3(fmt, args...) |
|
#define | clib_mem_free_safe(p) |
|
#define | fill_with_random_data(ptr, bytes, seed) |
|
#define | compute_mem_hash(hash, ptr, bytes) |
|
#define | log2_align_down(value, align) |
|
#define | log2_align_up(value, align) |
|
#define | log2_align_ptr_down(ptr, align) uword_to_pointer (log2_align_down (pointer_to_uword (ptr), align), void *) |
|
#define | log2_align_ptr_up(ptr, align) uword_to_pointer (log2_align_up (pointer_to_uword (ptr), align), void *) |
|
#define | MAX_LOG2_ALIGN 6 |
|
#define | MAX_UNALIGN_OFFSET ((1 << MAX_LOG2_ALIGN) - 1) |
|
#define | memory_snap() |
|
#define clib_mem_free_safe |
( |
|
p | ) |
|
Value:do { \
if (p) \
} \
} while (0)
static void clib_mem_free(void *p)
Definition at line 86 of file test_vec.h.
#define compute_mem_hash |
( |
|
hash, |
|
|
|
ptr, |
|
|
|
bytes |
|
) |
| |
Value: u8 * _v(p) = (
u8 *) (ptr);
\ \
if (_v(p) && _v(b) > 0) \
{ \
for (_v(
i) = 0; _v(
i) < _v(b); _v(
i)++) \
} \
\
})
sll srl srl sll sra u16x4 i
Definition at line 145 of file test_vec.h.
#define fill_with_random_data |
( |
|
ptr, |
|
|
|
bytes, |
|
|
|
seed |
|
) |
| |
Value: u8 * _v(p) = (
u8 *) (ptr);
\ \
for (_v(
i) = 0; _v(
i) < _v(b); _v(
i)++) \
\
} while (0)
sll srl srl sll sra u16x4 i
static u32 bounded_random_u32(u32 *seed, uword lo, uword hi)
Definition at line 134 of file test_vec.h.
#define log2_align_down |
( |
|
value, |
|
|
|
align |
|
) |
| |
Value: uword _m = (1 << _a) - 1; \
\
_v = _v & ~_m; \
})
Definition at line 161 of file test_vec.h.
#define log2_align_up |
( |
|
value, |
|
|
|
align |
|
) |
| |
Value: uword _m = (1 << _a) - 1; \
\
_v = (_v + _m) & ~_m; \
})
Definition at line 170 of file test_vec.h.
Value:do { \
clib_mem_usage_t _usage = { 0 };
\} while (0)
u8 * format_clib_mem_usage(u8 *s, va_list *args)
void clib_mem_usage(clib_mem_usage_t *usage)
Definition at line 227 of file test_vec.h.
#define VERBOSE1 |
( |
|
fmt, |
|
|
|
args... |
|
) |
| |
#define VERBOSE2 |
( |
|
fmt, |
|
|
|
args... |
|
) |
| |
#define VERBOSE3 |
( |
|
fmt, |
|
|
|
args... |
|
) |
| |
static void* alloc_aligned |
( |
uword |
size, |
|
|
uword |
log2_align, |
|
|
void ** |
ptr_to_free |
|
) |
| |
|
inlinestatic |
static void* alloc_unaligned |
( |
uword |
size, |
|
|
uword |
offset, |
|
|
void ** |
ptr_to_free |
|
) |
| |
|
inlinestatic |
static u8* format_u32_binary |
( |
u8 * |
s, |
|
|
va_list * |
va |
|
) |
| |
|
inlinestatic |
static u32 my_random_u32 |
( |
u32 * |
seed_return | ) |
|
|
static |