diff options
author | wollman <wollman@FreeBSD.org> | 1998-03-24 18:06:34 +0000 |
---|---|---|
committer | wollman <wollman@FreeBSD.org> | 1998-03-24 18:06:34 +0000 |
commit | d43e6115b673fe03cf9272a6c74af0c41177fef9 (patch) | |
tree | 566a95c1f14bd40b7c20c3cb610da126805e9eed /sys/netinet/udp_usrreq.c | |
parent | 297cf38a76000d829e4962efc26732a7e4eef52d (diff) | |
download | FreeBSD-src-d43e6115b673fe03cf9272a6c74af0c41177fef9.zip FreeBSD-src-d43e6115b673fe03cf9272a6c74af0c41177fef9.tar.gz |
Use the zone allocator to allocate inpcbs and tcpcbs. Each protocol creates
its own zone; this is used particularly by TCP which allocates both inpcb and
tcpcb in a single allocation. (Some hackery ensures that the tcpcb is
reasonably aligned.) Also keep track of the number of pcbs of each type
allocated, and keep a generation count (instance version number) for future
use.
Diffstat (limited to 'sys/netinet/udp_usrreq.c')
-rw-r--r-- | sys/netinet/udp_usrreq.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/netinet/udp_usrreq.c b/sys/netinet/udp_usrreq.c index 773e42d..f9dd1a7 100644 --- a/sys/netinet/udp_usrreq.c +++ b/sys/netinet/udp_usrreq.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)udp_usrreq.c 8.6 (Berkeley) 5/23/95 - * $Id: udp_usrreq.c,v 1.43 1998/01/25 17:25:41 steve Exp $ + * $Id: udp_usrreq.c,v 1.44 1998/01/27 09:15:13 davidg Exp $ */ #include <sys/param.h> @@ -44,6 +44,7 @@ #include <sys/socketvar.h> #include <sys/sysctl.h> #include <sys/syslog.h> +#include <vm/vm_zone.h> #include <net/if.h> #include <net/route.h> @@ -98,6 +99,8 @@ udp_init() udbinfo.listhead = &udb; udbinfo.hashbase = hashinit(UDBHASHSIZE, M_PCB, &udbinfo.hashmask); udbinfo.porthashbase = hashinit(UDBHASHSIZE, M_PCB, &udbinfo.porthashmask); + udbinfo.ipi_zone = zinit("udpcb", sizeof(struct inpcb), nmbclusters, + ZONE_INTERRUPT, 0); } void |