diff options
author | Dave Barach <dave@barachs.net> | 2015-12-12 10:37:00 -0500 |
---|---|---|
committer | Dave Barach <dave@barachs.net> | 2015-12-12 10:37:21 -0500 |
commit | 95bb883a62b5b4da53c5082ae93ccc3bfd867467 (patch) | |
tree | 701c3acf73700169009c90a36b261fd02f52a438 /svm/svm.c | |
parent | cb9cadad578297ffd78fa8a33670bdf1ab669e7e (diff) |
Handle large user-mode page sizes, tested to 64k
Change-Id: Iccabc1be6e3a2822268c7b60e9c4e8250677c2ac
Signed-off-by: Dave Barach <dave@barachs.net>
Diffstat (limited to 'svm/svm.c')
-rw-r--r-- | svm/svm.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/svm/svm.c b/svm/svm.c index c629f932008..4d45b29785d 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; |