aboutsummaryrefslogtreecommitdiffstats
path: root/svm/svm.c
diff options
context:
space:
mode:
authorEd Warnicke <eaw@cisco.com>2015-12-13 16:43:54 +0000
committerGerrit Code Review <gerrit@projectrotterdam.info>2015-12-13 16:43:54 +0000
commit29726ab117a1fc5b3d92d1afaaaaa08ef7f138eb (patch)
tree678e9edc335c3c747cf0d0daf2a37d4c43d84aef /svm/svm.c
parent261e9fffd58268f6ce3d9b80da11f50217113219 (diff)
parent95bb883a62b5b4da53c5082ae93ccc3bfd867467 (diff)
Merge "Handle large user-mode page sizes, tested to 64k"
Diffstat (limited to 'svm/svm.c')
-rw-r--r--svm/svm.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/svm/svm.c b/svm/svm.c
index c629f932..4d45b297 100644
--- a/svm/svm.c
+++ b/svm/svm.c
@@ -632,7 +632,10 @@ static void svm_region_init_internal (char *root_path)
atexit(svm_mutex_cleanup);
/* Randomize the shared-VM base at init time */
- randomize_baseva = (ticks & 15) * 4096;
+ if (MMAP_PAGESIZE <= (4<<10))
+ randomize_baseva = (ticks & 15) * MMAP_PAGESIZE;
+ else
+ randomize_baseva = (ticks & 3) * MMAP_PAGESIZE;
vec_validate(a,0);
a->root_path = root_path;