diff options
author | jeff <jeff@FreeBSD.org> | 2002-03-20 04:09:59 +0000 |
---|---|---|
committer | jeff <jeff@FreeBSD.org> | 2002-03-20 04:09:59 +0000 |
commit | 318cbeeecf54d416eb936f4bb65c00b18aab686b (patch) | |
tree | daba3c4ee1ae7fcfe85223bbb04c0bc9cea8fba2 /sys/kern/kern_event.c | |
parent | 24fdcd89ad7474e39c39b6ae22c234c6b0d5b40c (diff) | |
download | FreeBSD-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/kern_event.c')
-rw-r--r-- | sys/kern/kern_event.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/sys/kern/kern_event.c b/sys/kern/kern_event.c index 0e0682b..d9e6c8f 100644 --- a/sys/kern/kern_event.c +++ b/sys/kern/kern_event.c @@ -49,7 +49,7 @@ #include <sys/sysproto.h> #include <sys/uio.h> -#include <vm/vm_zone.h> +#include <vm/uma.h> MALLOC_DEFINE(M_KQUEUE, "kqueue", "memory for kqueue system"); @@ -107,7 +107,7 @@ static struct filterops proc_filtops = static struct filterops timer_filtops = { 0, filt_timerattach, filt_timerdetach, filt_timer }; -static vm_zone_t knote_zone; +static uma_zone_t knote_zone; static int kq_ncallouts = 0; static int kq_calloutmax = (4 * 1024); SYSCTL_INT(_kern, OID_AUTO, kq_calloutmax, CTLFLAG_RW, @@ -1063,18 +1063,20 @@ knote_dequeue(struct knote *kn) static void knote_init(void) { - knote_zone = zinit("KNOTE", sizeof(struct knote), 0, 0, 1); + knote_zone = uma_zcreate("KNOTE", sizeof(struct knote), NULL, NULL, + NULL, NULL, UMA_ALIGN_PTR, 0); + } SYSINIT(knote, SI_SUB_PSEUDO, SI_ORDER_ANY, knote_init, NULL) static struct knote * knote_alloc(void) { - return ((struct knote *)zalloc(knote_zone)); + return ((struct knote *)uma_zalloc(knote_zone, M_WAITOK)); } static void knote_free(struct knote *kn) { - zfree(knote_zone, kn); + uma_zfree(knote_zone, kn); } |