summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>2011-01-29 15:23:02 +0000
committeralc <alc@FreeBSD.org>2011-01-29 15:23:02 +0000
commit48530618fa80ecf1ff9a984c3bcc14a07bb41986 (patch)
tree7fc1baa8edf6e9503b8659f8679eda148eba2c14 /sys
parent77d48002a19e638ce8fe8f56eb5287de5c0aab24 (diff)
downloadFreeBSD-src-48530618fa80ecf1ff9a984c3bcc14a07bb41986.zip
FreeBSD-src-48530618fa80ecf1ff9a984c3bcc14a07bb41986.tar.gz
Reenable the call to vm_map_simplify_entry() from vm_map_insert() for non-
MAP_STACK_* entries. (See r71983 and r74235.) In some cases, performing this call to vm_map_simplify_entry() halves the number of vm map entries used by the Sun JDK.
Diffstat (limited to 'sys')
-rw-r--r--sys/vm/vm_map.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c
index 1a51af8..59d7fe1 100644
--- a/sys/vm/vm_map.c
+++ b/sys/vm/vm_map.c
@@ -1293,17 +1293,13 @@ charged:
vm_map_entry_link(map, prev_entry, new_entry);
map->size += new_entry->end - new_entry->start;
-#if 0
- /*
- * Temporarily removed to avoid MAP_STACK panic, due to
- * MAP_STACK being a huge hack. Will be added back in
- * when MAP_STACK (and the user stack mapping) is fixed.
- */
/*
- * It may be possible to simplify the entry
+ * It may be possible to merge the new entry with the next and/or
+ * previous entries. However, due to MAP_STACK_* being a hack, a
+ * panic can result from merging such entries.
*/
- vm_map_simplify_entry(map, new_entry);
-#endif
+ if ((cow & (MAP_STACK_GROWS_DOWN | MAP_STACK_GROWS_UP)) == 0)
+ vm_map_simplify_entry(map, new_entry);
if (cow & (MAP_PREFAULT|MAP_PREFAULT_PARTIAL)) {
vm_map_pmap_enter(map, start, prot,
OpenPOWER on IntegriCloud