From b3d93dacfde8ab21bbce171fff2971b2ed7bce6a Mon Sep 17 00:00:00 2001 From: Dave Barach Date: Wed, 3 Aug 2016 14:34:38 -0400 Subject: VPP-236 Support 64-bit vector lengths, shared memory segments >4 GB Change-Id: I02aee33e96e7ae32094b9f82f6a667d30bb52f59 Signed-off-by: Dave Barach --- svm/svmtool.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'svm/svmtool.c') diff --git a/svm/svmtool.c b/svm/svmtool.c index 545f071e..2e55a087 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); -- cgit 1.2.3-korg