From 318cbeeecf54d416eb936f4bb65c00b18aab686b Mon Sep 17 00:00:00 2001 From: jeff Date: Wed, 20 Mar 2002 04:09:59 +0000 Subject: Remove references to vm_zone.h and switch over to the new uma API. Also, remove maxsockets. If you look carefully you'll notice that the old zone allocator never honored this anyway. --- sys/kern/uipc_domain.c | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) (limited to 'sys/kern/uipc_domain.c') diff --git a/sys/kern/uipc_domain.c b/sys/kern/uipc_domain.c index e51af51..9e80733 100644 --- a/sys/kern/uipc_domain.c +++ b/sys/kern/uipc_domain.c @@ -42,7 +42,7 @@ #include #include #include -#include +#include /* * System initialization @@ -122,18 +122,11 @@ domaininit(void *dummy) { /* * Before we do any setup, make sure to initialize the - * zone allocator we get struct sockets from. The obvious - * maximum number of sockets is `maxfiles', but it is possible - * to have a socket without an open file (e.g., a connection waiting - * to be accept(2)ed). Rather than think up and define a - * better value, we just use nmbclusters, since that's what people - * are told to increase first when the network runs out of memory. - * Perhaps we should have two pools, one of unlimited size - * for use during socreate(), and one ZONE_INTERRUPT pool for - * use in sonewconn(). + * zone allocator we get struct sockets from. */ - socket_zone = zinit("socket", sizeof(struct socket), maxsockets, - ZONE_INTERRUPT, 0); + + socket_zone = uma_zcreate("socket", sizeof(struct socket), NULL, NULL, + NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_NOFREE); if (max_linkhdr < 16) /* XXX */ max_linkhdr = 16; -- cgit v1.1