summaryrefslogtreecommitdiffstats
path: root/sys/kern/uipc_domain.c
diff options
context:
space:
mode:
authorjeff <jeff@FreeBSD.org>2002-03-20 04:09:59 +0000
committerjeff <jeff@FreeBSD.org>2002-03-20 04:09:59 +0000
commit318cbeeecf54d416eb936f4bb65c00b18aab686b (patch)
treedaba3c4ee1ae7fcfe85223bbb04c0bc9cea8fba2 /sys/kern/uipc_domain.c
parent24fdcd89ad7474e39c39b6ae22c234c6b0d5b40c (diff)
downloadFreeBSD-src-318cbeeecf54d416eb936f4bb65c00b18aab686b.zip
FreeBSD-src-318cbeeecf54d416eb936f4bb65c00b18aab686b.tar.gz
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.
Diffstat (limited to 'sys/kern/uipc_domain.c')
-rw-r--r--sys/kern/uipc_domain.c17
1 files changed, 5 insertions, 12 deletions
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 <sys/kernel.h>
#include <sys/socketvar.h>
#include <sys/systm.h>
-#include <vm/vm_zone.h>
+#include <vm/uma.h>
/*
* 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;
OpenPOWER on IntegriCloud