diff options
| author | Alan Cox <alc@FreeBSD.org> | 2002-06-10 06:11:45 +0000 |
|---|---|---|
| committer | Alan Cox <alc@FreeBSD.org> | 2002-06-10 06:11:45 +0000 |
| commit | 2b4a2c272dfbe96a0781a80cf741a6215203f13a (patch) | |
| tree | c72f02fcdfd8557efd2b75fcf748744a6446fd9f /sys | |
| parent | 03fef72fe9ced7bddcd40ea82adb29e262294b8b (diff) | |
Notes
Diffstat (limited to 'sys')
| -rw-r--r-- | sys/vm/vm_map.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c index bc1803c0468f..e4bf9933cfb8 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); } |
