kernel - Fix vm.max_proc_mmap
authorMatthew Dillon <dillon@apollo.backplane.com>
Sat, 21 Oct 2017 06:11:30 +0000 (23:11 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Tue, 31 Oct 2017 17:49:47 +0000 (10:49 -0700)
commitf52708b0e2a001116766cd079f6014ee25d4089f
tree002cfcffee4e0ce7b980d4c1d5d2a280092876d5
parente845e9dc5c58952132cd9271bfed632bf19ff619
kernel - Fix vm.max_proc_mmap

* The vm.max_proc_mmap calculation always overflowed, and was only
  saved by the result always being some ridiculously large nujmber
  (98M).  vm.max_proc_mmap is an int and the calculation was based on
  KvaSize which is ... a huge number much larger than anything an
  int can hold.

* Replace the mess with a hard-coded value of 1000000.  The value can
  be changed via sysctl as before.
sys/vm/vm_mmap.c