Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/rump/librump/rumpkern zalloc struct vmspace to avoid hav...



details:   https://anonhg.NetBSD.org/src/rev/72236dde8c13
branches:  trunk
changeset: 761902:72236dde8c13
user:      pooka <pooka%NetBSD.org@localhost>
date:      Thu Feb 10 13:31:55 2011 +0000

description:
zalloc struct vmspace to avoid having one full of garbage

diffstat:

 sys/rump/librump/rumpkern/rump.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r edb8403dee80 -r 72236dde8c13 sys/rump/librump/rumpkern/rump.c
--- a/sys/rump/librump/rumpkern/rump.c  Thu Feb 10 13:31:30 2011 +0000
+++ b/sys/rump/librump/rumpkern/rump.c  Thu Feb 10 13:31:55 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rump.c,v 1.228 2011/02/03 11:01:51 pooka Exp $ */
+/*     $NetBSD: rump.c,v 1.229 2011/02/10 13:31:55 pooka Exp $ */
 
 /*
  * Copyright (c) 2007 Antti Kantee.  All Rights Reserved.
@@ -28,7 +28,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rump.c,v 1.228 2011/02/03 11:01:51 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rump.c,v 1.229 2011/02/10 13:31:55 pooka Exp $");
 
 #include <sys/systm.h>
 #define ELFSIZE ARCH_ELFSIZE
@@ -768,7 +768,7 @@
         * Refcount will eternally be 1.
         */
        p = curproc;
-       newspace = kmem_alloc(sizeof(*newspace), KM_SLEEP);
+       newspace = kmem_zalloc(sizeof(*newspace), KM_SLEEP);
        newspace->vm_refcnt = 1;
        newspace->vm_map.pmap = priv;
        KASSERT(p->p_vmspace == vmspace_kernel());



Home | Main Index | Thread Index | Old Index