Module Name: src
Committed By: pooka
Date: Thu Feb 10 13:31:56 UTC 2011
Modified Files:
src/sys/rump/librump/rumpkern: rump.c
Log Message:
zalloc struct vmspace to avoid having one full of garbage
To generate a diff of this commit:
cvs rdiff -u -r1.228 -r1.229 src/sys/rump/librump/rumpkern/rump.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/rump/librump/rumpkern/rump.c
diff -u src/sys/rump/librump/rumpkern/rump.c:1.228 src/sys/rump/librump/rumpkern/rump.c:1.229
--- src/sys/rump/librump/rumpkern/rump.c:1.228 Thu Feb 3 11:01:51 2011
+++ src/sys/rump/librump/rumpkern/rump.c Thu Feb 10 13:31:55 2011
@@ -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());