summaryrefslogtreecommitdiffstats
path: root/src/svm/ssvm.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/svm/ssvm.c')
-rw-r--r--src/svm/ssvm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/svm/ssvm.c b/src/svm/ssvm.c
index 3e45175da0e..2a6e6bf78da 100644
--- a/src/svm/ssvm.c
+++ b/src/svm/ssvm.c
@@ -352,8 +352,8 @@ ssvm_master_init_private (ssvm_private_t * ssvm)
u32 rnd_size = 0;
u8 *heap;
- rnd_size = (ssvm->ssvm_size + (pagesize - 1)) & ~(pagesize - 1);
- rnd_size = clib_min (rnd_size, ((u64) 1 << 32) - pagesize);
+ rnd_size = clib_max (ssvm->ssvm_size + (pagesize - 1), ssvm->ssvm_size);
+ rnd_size &= ~(pagesize - 1);
#if USE_DLMALLOC == 0
{