diff options
author | arr <arr@FreeBSD.org> | 2002-06-13 14:32:51 +0000 |
---|---|---|
committer | arr <arr@FreeBSD.org> | 2002-06-13 14:32:51 +0000 |
commit | 14714108891719cd4af97afba8c20ed7b9f5a0f4 (patch) | |
tree | d4d37a64db8643744bf8333ce20f45640c1bcaef /sys/netatm/uni/uniarp_vcm.c | |
parent | 2f568aeb91d6d5f3b370b9b641b5a64a3466d1bd (diff) | |
download | FreeBSD-src-14714108891719cd4af97afba8c20ed7b9f5a0f4.zip FreeBSD-src-14714108891719cd4af97afba8c20ed7b9f5a0f4.tar.gz |
- Finish the uni part of the storage pool cleanup. There should now only
be a few bits left to clean from the HARP code in terms of what is using
the storage pools; once that's done, the memory management code can be
removed entirely.
This commit effectively changes the use of dynamic memory routines from
atm_allocate, atm_free, atm_release_pool to uma_zcreate, uma_zalloc,
uma_zfree, uma_zdestroy.
Diffstat (limited to 'sys/netatm/uni/uniarp_vcm.c')
-rw-r--r-- | sys/netatm/uni/uniarp_vcm.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/sys/netatm/uni/uniarp_vcm.c b/sys/netatm/uni/uniarp_vcm.c index 5903e04..ac1c167 100644 --- a/sys/netatm/uni/uniarp_vcm.c +++ b/sys/netatm/uni/uniarp_vcm.c @@ -60,10 +60,13 @@ #include <netatm/ipatm/ipatm_serv.h> #include <netatm/uni/uniip_var.h> +#include <vm/uma.h> + #ifndef lint __RCSID("@(#) $FreeBSD$"); #endif +extern uma_zone_t unisig_vc_zone; /* * Local variables @@ -130,7 +133,7 @@ uniarp_pvcopen(ivp) /* * Get an arp map entry */ - uap = (struct uniarp *)atm_allocate(&uniarp_pool); + uap = uma_zalloc(uniarp_zone, M_WAITOK | M_ZERO); if (uap == NULL) return (MAP_FAILED); @@ -147,7 +150,7 @@ uniarp_pvcopen(ivp) (void) atm_cm_release(ivp->iv_arpconn, &uniarp_cause); ivp->iv_arpconn = NULL; } - atm_free((caddr_t)uap); + uma_zfree(uniarp_zone, uap); return (MAP_FAILED); } @@ -276,7 +279,7 @@ uniarp_svcout(ivp, dst) /* * We're a client with an open VCC to the server, get a new arp entry */ - uap = (struct uniarp *)atm_allocate(&uniarp_pool); + uap = uma_zalloc(uniarp_zone, M_WAITOK); if (uap == NULL) { (void) splx(s); return (MAP_FAILED); @@ -437,7 +440,7 @@ uniarp_svcin(ivp, dst, dstsub) /* * No info in the cache - get a new arp entry */ - uap = (struct uniarp *)atm_allocate(&uniarp_pool); + uap = uma_zalloc(uniarp_zone, M_WAITOK | M_ZERO); if (uap == NULL) { (void) splx(s); return (MAP_FAILED); @@ -659,8 +662,7 @@ uniarp_vcclose(ivp) /* * Finally, free the entry */ - atm_free((caddr_t)uap); - + uma_zfree(uniarp_zone, uap); (void) splx(s); return; } @@ -719,8 +721,7 @@ uniarp_cleared(toku, cause) * If IP is finished with VCC, then we'll free it */ if (ivp->iv_state == IPVCC_FREE) - atm_free((caddr_t)ivp); - + uma_zfree(unisig_vc_zone, ivp); (void) splx(s); } |