Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/sun3/sun3 convert from malloc(9) to kmem(9)
details: https://anonhg.NetBSD.org/src/rev/8fca581918d6
branches: trunk
changeset: 773245:8fca581918d6
user: para <para%NetBSD.org@localhost>
date: Sun Jan 29 16:24:51 2012 +0000
description:
convert from malloc(9) to kmem(9)
diffstat:
sys/arch/sun3/sun3/pmap.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diffs (45 lines):
diff -r 57493ed529ee -r 8fca581918d6 sys/arch/sun3/sun3/pmap.c
--- a/sys/arch/sun3/sun3/pmap.c Sun Jan 29 16:24:01 2012 +0000
+++ b/sys/arch/sun3/sun3/pmap.c Sun Jan 29 16:24:51 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.c,v 1.166 2011/06/03 17:03:53 tsutsui Exp $ */
+/* $NetBSD: pmap.c,v 1.167 2012/01/29 16:24:51 para Exp $ */
/*-
* Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -80,7 +80,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.166 2011/06/03 17:03:53 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.167 2012/01/29 16:24:51 para Exp $");
#include "opt_ddb.h"
#include "opt_pmap_debug.h"
@@ -88,7 +88,7 @@
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/proc.h>
-#include <sys/malloc.h>
+#include <sys/kmem.h>
#include <sys/pool.h>
#include <sys/queue.h>
#include <sys/kcore.h>
@@ -1849,7 +1849,7 @@
pmap_user_init(pmap_t pmap)
{
int i;
- pmap->pm_segmap = malloc(sizeof(char)*NUSEG, M_VMPMAP, M_WAITOK);
+ pmap->pm_segmap = kmem_alloc(sizeof(char)*NUSEG, KM_SLEEP);
for (i = 0; i < NUSEG; i++) {
pmap->pm_segmap[i] = SEGINV;
}
@@ -1900,7 +1900,7 @@
#endif
context_free(pmap);
}
- free(pmap->pm_segmap, M_VMPMAP);
+ kmem_free(pmap->pm_segmap, sizeof(char)*NUSEG);
pmap->pm_segmap = NULL;
splx(s);
Home |
Main Index |
Thread Index |
Old Index