diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2009-10-14 01:24:38 +0200 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2009-10-14 01:24:38 +0200 |
commit | a72523c6570b17311babc105edc7105bc0dce4aa (patch) | |
tree | 9e770b98b63189398221fa8efe9f68b76bdd6467 /kern/zalloc.c | |
parent | 0f7b1d4d0c4672aceb912dabd60dee1f40396e6f (diff) |
Fix yet more allocation failures during gc
kern/zalloc.c (zone_gc): Allocate and free two vm_map_kentry_zone elements to
make sure the gc will be able to allocate two in vm_map_delete.
Diffstat (limited to 'kern/zalloc.c')
-rw-r--r-- | kern/zalloc.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/kern/zalloc.c b/kern/zalloc.c index 1a70e4c..f2904e4 100644 --- a/kern/zalloc.c +++ b/kern/zalloc.c @@ -835,7 +835,10 @@ static void zone_gc(void) * hang because zone_map is already locked by vm_map_delete */ extern zone_t vm_map_kentry_zone; /* zone for kernel entry structures */ - zfree(vm_map_kentry_zone, zalloc(vm_map_kentry_zone)); + vm_offset_t entry1 = zalloc(vm_map_kentry_zone), + entry2 = zalloc(vm_map_kentry_zone); + zfree(vm_map_kentry_zone, entry1); + zfree(vm_map_kentry_zone, entry2); kmem_free(zone_map, free_addr, PAGE_SIZE); } |