1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
|
The Linux kernel unfortunately places a limit of 65536 on the max number of
mappings you can have. One person cited a security reason, but I can't see
anything that you can do with lots of mappings that RLIMIT_AS can't fix.
Not to mention the comment at the top of the define doesn't seem to indicate
that the limit is all that carefully chosen.
So there are four patches in this directory:
fixed_map-linux_2.2.18.patch
fixed_map-linux_2.4.1.patch
proc_map-linux_2.2.18.patch
proc_map-linux_2.4.1.patch
The fix_map patches change the define MAX_MAP_COUNT to the maximum number of
pages to fit in to the address space. In other words, it changes the default
limit to the max, so you never have to worry about it again.
The proc_map patches create a file in proc (/proc/sys/vm/max_map_count) as
well as a sysctl (vm.max_map_count) that allow you to tune the count. The
default is MAX_MAP_COUNT.
If you apply both patches, the default becomes the maximum number of mappings
that can fit in your address space, and you only need to worry about proc if
you wish to tune it lower for some reason.
Apply these patches in the usual manor:
(cd /usr/src/linux ; patch -p1 < patch), then recompile your kernel.
Sorry this has to be a seperate patch. If you know anyone on the inside of the
Linux VM team, please see if you can do a little arm twisting to get this
included.
You will need this patch to debug Mozilla. It's just that big ;)
|