diff options
author | Dave Barach <dave@barachs.net> | 2016-08-03 14:34:38 -0400 |
---|---|---|
committer | Keith Burns <alagalah@gmail.com> | 2016-08-15 13:57:25 +0000 |
commit | b3d93dacfde8ab21bbce171fff2971b2ed7bce6a (patch) | |
tree | 8d3b44e8a8fcbf155979114a929590fc9473b914 /vlib-api/vlibmemory/memory_vlib.c | |
parent | c53191deb39231cf8408cf9eb0adf5c878ddda68 (diff) |
VPP-236 Support 64-bit vector lengths, shared memory segments >4 GB
Change-Id: I02aee33e96e7ae32094b9f82f6a667d30bb52f59
Signed-off-by: Dave Barach <dave@barachs.net>
Diffstat (limited to 'vlib-api/vlibmemory/memory_vlib.c')
-rw-r--r-- | vlib-api/vlibmemory/memory_vlib.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/vlib-api/vlibmemory/memory_vlib.c b/vlib-api/vlibmemory/memory_vlib.c index 68752745d66..2212b46bce4 100644 --- a/vlib-api/vlibmemory/memory_vlib.c +++ b/vlib-api/vlibmemory/memory_vlib.c @@ -1176,8 +1176,21 @@ clib_error_t * vlibmemory_init (vlib_main_t * vm) { api_main_t *am = &api_main; - /* Normally NULL / 0, set by cmd line "api-segment" */ - svm_region_init_chroot_uid_gid (am->root_path, am->api_uid, am->api_gid); + svm_map_region_args_t _a, *a = &_a; + + memset (a, 0, sizeof (*a)); + a->root_path = am->root_path; + a->name = SVM_GLOBAL_REGION_NAME; + a->baseva = (am->global_baseva != 0) ? + am->global_baseva : SVM_GLOBAL_REGION_BASEVA; + a->size = (am->global_size != 0) ? am->global_size : SVM_GLOBAL_REGION_SIZE; + a->flags = SVM_FLAGS_NODATA; + a->uid = am->api_uid; + a->gid = am->api_gid; + a->pvt_heap_size = (am->global_pvt_heap_size != 0) ? am->global_pvt_heap_size + : SVM_PVT_MHEAP_SIZE; + + svm_region_init_args (a); return 0; } |