aboutsummaryrefslogtreecommitdiffstats
path: root/svm/svmtool.c
diff options
context:
space:
mode:
authorDave Barach <dave@barachs.net>2016-08-03 14:34:38 -0400
committerKeith Burns <alagalah@gmail.com>2016-08-15 13:57:25 +0000
commitb3d93dacfde8ab21bbce171fff2971b2ed7bce6a (patch)
tree8d3b44e8a8fcbf155979114a929590fc9473b914 /svm/svmtool.c
parentc53191deb39231cf8408cf9eb0adf5c878ddda68 (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 'svm/svmtool.c')
-rw-r--r--svm/svmtool.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/svm/svmtool.c b/svm/svmtool.c
index 545f071e47e..2e55a0873e3 100644
--- a/svm/svmtool.c
+++ b/svm/svmtool.c
@@ -206,10 +206,10 @@ svm_map_region_nolock (svm_map_region_args_t * a)
* rnd_pagesize
* Round to a pagesize multiple, presumably 4k works
*/
-static unsigned int
-rnd_pagesize (unsigned int size)
+static u64
+rnd_pagesize (u64 size)
{
- unsigned int rv;
+ u64 rv;
rv = (size + (MMAP_PAGESIZE - 1)) & ~(MMAP_PAGESIZE - 1);
return (rv);
@@ -247,7 +247,8 @@ svm_existing_region_map_nolock (void *root_arg, svm_map_region_args_t * a)
void *oldheap;
uword *p;
- a->size += MMAP_PAGESIZE + SVM_PVT_MHEAP_SIZE;
+ a->size += MMAP_PAGESIZE +
+ (a->pvt_heap_size ? a->pvt_heap_size : SVM_PVT_MHEAP_SIZE);
a->size = rnd_pagesize (a->size);
region_lock (root_rp, 4);