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().
This commit is contained in:
Alan Cox 2002-06-10 06:11:45 +00:00
parent 03fef72fe9
commit 2b4a2c272d

View File

@ -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);
}