21 #ifndef __included_svm_h__ 22 #define __included_svm_h__ 28 #define MMAP_PAGESIZE (clib_mem_get_page_size()) 30 #define SVM_VERSION ((1<<16) | 1) 32 #define SVM_FLAGS_MHEAP (1<<0) 33 #define SVM_FLAGS_FILE (1<<1) 34 #define SVM_FLAGS_NODATA (1<<2) 35 #define SVM_FLAGS_NEED_DATA_INIT (1<<3) 37 #define SVM_PVT_MHEAP_SIZE (128<<10) 91 #define SVM_GLOBAL_REGION_BASEVA 0x30000000 92 #define SVM_GLOBAL_REGION_SIZE (64<<20) 93 #define SVM_GLOBAL_REGION_NAME "/global_vm" 98 #define SVM_OVERLAY_REGION_BASEVA \ 99 (SVM_GLOBAL_REGION_BASEVA + SVM_GLOBAL_REGION_SIZE) 100 #define SVM_OVERLAY_REGION_SIZE (1<<20) 101 #define SVM_OVERLAY_REGION_BASENAME "/overlay_vm" 134 pthread_mutex_lock (&rp->
mutex);
138 pthread_mutex_unlock (&rp->
mutex);
150 pthread_mutex_lock (&rp->
mutex);
154 pthread_mutex_unlock (&rp->
mutex);
164 pthread_mutex_lock (&rp->
mutex);
168 pthread_mutex_unlock (&rp->
mutex);
177 return ((
void *) oldheap);
185 return ((
void *) oldheap);
void svm_region_exit(void)
static void svm_pop_heap(void *oldheap)
void svm_region_init_chroot_uid_gid(char *root_path, int uid, int gid)
void * svm_region_find_or_create(svm_map_region_args_t *a)
static void svm_mem_free(svm_region_t *rp, void *ptr)
void svm_region_init_args(svm_map_region_args_t *a)
static void * svm_push_data_heap(svm_region_t *rp)
u8 * shm_name_from_svm_map_region_args(svm_map_region_args_t *a)
svm_region_t * svm_get_root_rp(void)
static void * svm_mem_alloc_aligned_at_offset(svm_region_t *rp, uword size, uword align, uword offset)
static void * svm_mem_alloc(svm_region_t *rp, uword size)
svm_subregion_t * subregions
static void * clib_mem_alloc_aligned_at_offset(uword size, uword align, uword align_offset)
static void * svm_push_pvt_heap(svm_region_t *rp)
static void * clib_mem_set_heap(void *heap)
void svm_client_scan(char *root_path)
void svm_region_init_chroot(char *root_path)
struct svm_map_region_args_ svm_map_region_args_t
static void clib_mem_free(void *p)
static void * clib_mem_alloc(uword size)
void svm_region_init(void)
template key/value backing page structure
u8 * format_svm_region(u8 *s, va_list *args)
void svm_client_scan_this_region_nolock(svm_region_t *rp)
struct svm_region_ svm_region_t
void svm_region_unmap(void *rp_arg)