summaryrefslogtreecommitdiff
path: root/sys/uvm/uvm_map.c
diff options
context:
space:
mode:
authorOwain Ainsworth <oga@cvs.openbsd.org>2009-05-02 12:54:43 +0000
committerOwain Ainsworth <oga@cvs.openbsd.org>2009-05-02 12:54:43 +0000
commit772b0c37f150c6ea557a6f0914cf713d966413c4 (patch)
tree6326d009e7938e4553f4cb9dfcb9f4e36ed46f87 /sys/uvm/uvm_map.c
parent8453a3eb6c668c29ab3d93b698cf7cca6ef0d3ac (diff)
a few more memset changes.
two cases of pool_get() + memset(0) -> pool_get(,,,PR_ZERO) 1.5 cases of global variables are already zeroed, so don't zero them. ok ariane@, comments on stuff i'd missed from blambert@ and cnst@.
Diffstat (limited to 'sys/uvm/uvm_map.c')
-rw-r--r--sys/uvm/uvm_map.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/uvm/uvm_map.c b/sys/uvm/uvm_map.c
index 75abac9c9f2..8858a585027 100644
--- a/sys/uvm/uvm_map.c
+++ b/sys/uvm/uvm_map.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvm_map.c,v 1.109 2009/03/25 20:00:18 oga Exp $ */
+/* $OpenBSD: uvm_map.c,v 1.110 2009/05/02 12:54:42 oga Exp $ */
/* $NetBSD: uvm_map.c,v 1.86 2000/11/27 08:40:03 chs Exp $ */
/*
@@ -3191,7 +3191,7 @@ uvmspace_alloc(vaddr_t min, vaddr_t max, boolean_t pageable,
struct vmspace *vm;
UVMHIST_FUNC("uvmspace_alloc"); UVMHIST_CALLED(maphist);
- vm = pool_get(&uvm_vmspace_pool, PR_WAITOK);
+ vm = pool_get(&uvm_vmspace_pool, PR_WAITOK | PR_ZERO);
uvmspace_init(vm, NULL, min, max, pageable, remove_holes);
UVMHIST_LOG(maphist,"<- done (vm=%p)", vm,0,0,0);
return (vm);
@@ -3209,8 +3209,6 @@ uvmspace_init(struct vmspace *vm, struct pmap *pmap, vaddr_t min, vaddr_t max,
{
UVMHIST_FUNC("uvmspace_init"); UVMHIST_CALLED(maphist);
- memset(vm, 0, sizeof(*vm));
-
uvm_map_setup(&vm->vm_map, min, max, pageable ? VM_MAP_PAGEABLE : 0);
if (pmap)