Make sure that amap slot calculation does not overflow
authorstefan <stefan@openbsd.org>
Thu, 14 Jul 2016 16:23:49 +0000 (16:23 +0000)
committerstefan <stefan@openbsd.org>
Thu, 14 Jul 2016 16:23:49 +0000 (16:23 +0000)
commitd674b59e530355c17c0d99afcd9786581927042c
tree3be2e7ebf26b03a2464dc0fb6e2564bea3b2087d
parentf6d409642fb973e67b0f527401d2afda11f1c558
Make sure that amap slot calculation does not overflow

This prevents from too small amaps being allocated by
forcing the allocation of a large number of slots.

Based on an analysis from Jesse Hertz and Tim Newsham.

ok kettenis@
sys/uvm/uvm_amap.c