48 .log2_n_per_cpu_stack_bytes = 20,
49 .log2_n_per_cpu_vm_bytes = 28,
69 if (memory || memory_size)
80 #define MAX_VM_MEG 1024 91 alloc_size = (alloc_size * 3) / 4;
103 #ifdef CLIB_LINUX_KERNEL 104 #include <asm/page.h> 107 {
return PAGE_SIZE; }
112 {
return getpagesize (); }
116 #ifdef CLIB_STANDALONE 123 int verbose = va_arg (*va,
int);
136 clib_warning (
"clib_mem_validate disabled (small object cache is ON)");
void clib_mem_usage(clib_mem_usage_t *u)
u8 * format_clib_mem_usage(u8 *s, va_list *va)
void * mheap_alloc(void *memory, uword size)
always_inline void * clib_mem_set_per_cpu_heap(u8 *new_heap)
u8 * format_mheap(u8 *s, va_list *va)
void * clib_mem_init(void *memory, uword memory_size)
vhost_user_memory_t memory
void * clib_per_cpu_mheaps[CLIB_MAX_MHEAPS]
always_inline void * clib_mem_get_per_cpu_heap(void)
void mheap_usage(void *v, clib_mem_usage_t *usage)
#define clib_warning(format, args...)
always_inline void * clib_mem_set_heap(void *heap)
always_inline void * clib_mem_get_heap(void)
uword clib_mem_validate_serial
uword clib_mem_get_page_size(void)
void mheap_trace(void *v, int enable)
void clib_mem_trace(int enable)
#define MHEAP_HAVE_SMALL_OBJECT_CACHE
void clib_mem_validate(void)
void mheap_validate(void *v)