summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>2002-06-10 06:11:45 +0000
committeralc <alc@FreeBSD.org>2002-06-10 06:11:45 +0000
commit319e2fb2b8c0400c55e769fc8b9c53477a3bf4b1 (patch)
treec72f02fcdfd8557efd2b75fcf748744a6446fd9f /sys
parent77f74738b6ba56eb73f26167c84d05fd567aa0d1 (diff)
downloadFreeBSD-src-319e2fb2b8c0400c55e769fc8b9c53477a3bf4b1.zip
FreeBSD-src-319e2fb2b8c0400c55e769fc8b9c53477a3bf4b1.tar.gz
o In vm_map_entry_create(), call uma_zalloc() with M_NOWAIT on system maps.
Submitted by: tegge o Eliminate the "!mapentzone" check from vm_map_entry_create() and vm_map_entry_dispose(). Reviewed by: tegge o Fix white-space usage in vm_map_entry_create().
Diffstat (limited to 'sys')
-rw-r--r--sys/vm/vm_map.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c
index bc1803c..e4bf993 100644
--- a/sys/vm/vm_map.c
+++ b/sys/vm/vm_map.c
@@ -504,8 +504,7 @@ vm_map_init(vm_map_t map, vm_offset_t min, vm_offset_t max)
static void
vm_map_entry_dispose(vm_map_t map, vm_map_entry_t entry)
{
- uma_zfree((map->system_map || !mapentzone)
- ? kmapentzone : mapentzone, entry);
+ uma_zfree(map->system_map ? kmapentzone : mapentzone, entry);
}
/*
@@ -519,10 +518,12 @@ vm_map_entry_create(vm_map_t map)
{
vm_map_entry_t new_entry;
- new_entry = uma_zalloc((map->system_map || !mapentzone) ?
- kmapentzone : mapentzone, M_WAITOK);
+ if (map->system_map)
+ new_entry = uma_zalloc(kmapentzone, M_NOWAIT);
+ else
+ new_entry = uma_zalloc(mapentzone, M_WAITOK);
if (new_entry == NULL)
- panic("vm_map_entry_create: kernel resources exhausted");
+ panic("vm_map_entry_create: kernel resources exhausted");
return (new_entry);
}
OpenPOWER on IntegriCloud