diff options
| author | Andrew Morton <akpm@osdl.org> | 2004-03-31 21:51:54 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-03-31 21:51:54 -0800 |
| commit | 56d93842e4840f371cb9acc8e5a628496b615a96 (patch) | |
| tree | 84aa2bab1dc46823c9d913b9872d52e627da3b44 /include/linux | |
| parent | bc5c1743cddcca31200f4a201fe9a70a87737ef8 (diff) | |
[PATCH] Replace MAX_MAP_COUNT with /proc/sys/vm/max_map_count
From: David Mosberger <davidm@napali.hpl.hp.com>
Below is a warmed up version of a patch originally done by Werner Almesberger
(see http://tinyurl.com/25zra) to replace the MAX_MAP_COUNT limit with a
sysctl variable. I thought this had gone into the tree a long time ago but
alas it has not and as luck would have it, the hard limit bit someone today
once again with a large app on a large machine.
Here is a small test app:
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/sched.h | 4 | ||||
| -rw-r--r-- | include/linux/sysctl.h | 1 |
2 files changed, 4 insertions, 1 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h index eb5bc2f12788..f5fa0c07a7f8 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -179,7 +179,9 @@ asmlinkage void schedule(void); struct namespace; /* Maximum number of active map areas.. This is a random (large) number */ -#define MAX_MAP_COUNT (65536) +#define DEFAULT_MAX_MAP_COUNT 65536 + +extern int sysctl_max_map_count; #include <linux/aio.h> diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h index dbd57168ac61..3767428df94d 100644 --- a/include/linux/sysctl.h +++ b/include/linux/sysctl.h @@ -158,6 +158,7 @@ enum VM_SWAPPINESS=19, /* Tendency to steal mapped memory */ VM_LOWER_ZONE_PROTECTION=20,/* Amount of protection of lower zones */ VM_MIN_FREE_KBYTES=21, /* Minimum free kilobytes to maintain */ + VM_MAX_MAP_COUNT=22, /* int: Maximum number of mmaps/address-space */ }; |
