diff options
author | Artur Grabowski <art@cvs.openbsd.org> | 2001-11-22 08:24:09 +0000 |
---|---|---|
committer | Artur Grabowski <art@cvs.openbsd.org> | 2001-11-22 08:24:09 +0000 |
commit | 8a4f275b86f537643a9aea4b5c9e8d49419fd31e (patch) | |
tree | 439e3b8856078f84278903ac5cf16e40df0a1b56 /sys/arch/sparc | |
parent | 4a01f748aabaf1ba3050868020a5038f1d2b6694 (diff) |
Use pool to allocate pv list entries.
Diffstat (limited to 'sys/arch/sparc')
-rw-r--r-- | sys/arch/sparc/sparc/pmap.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/sys/arch/sparc/sparc/pmap.c b/sys/arch/sparc/sparc/pmap.c index 25e5cd18588..56165c50c7c 100644 --- a/sys/arch/sparc/sparc/pmap.c +++ b/sys/arch/sparc/sparc/pmap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.c,v 1.94 2001/11/22 08:11:23 art Exp $ */ +/* $OpenBSD: pmap.c,v 1.95 2001/11/22 08:24:08 art Exp $ */ /* $NetBSD: pmap.c,v 1.118 1998/05/19 19:00:18 thorpej Exp $ */ /* @@ -186,6 +186,8 @@ pvhead(pnum) return &vm_physmem[bank].pmseg.pv_head[off]; } +struct pool pvpool; + /* * Wrappers around some memory allocation. * XXX - the plan is to make them non-sleeping. @@ -194,14 +196,14 @@ pvhead(pnum) static __inline struct pvlist * pvalloc() { - return malloc(sizeof(struct pvlist), M_VMPVENT, M_WAITOK); + return pool_get(&pvpool, PR_WAITOK); } static __inline void pvfree(pv) struct pvlist *pv; { - free(pv, M_VMPVENT); + pool_put(&pvpool, pv); } #if defined(SUN4M) @@ -3361,6 +3363,9 @@ pmap_init() sizeof(struct pvlist); } + pool_init(&pvpool, sizeof(struct pvlist), 0, 0, 0, "pvpl", 0, + NULL, NULL, 0); + /* * We can set it here since it's only used in pmap_enter to see * if pv lists have been mapped. |