diff --git a/sys/vm/vm_zone.c b/sys/vm/vm_zone.c index 1bf973210a9f..5dfbf503ec8b 100644 --- a/sys/vm/vm_zone.c +++ b/sys/vm/vm_zone.c @@ -18,7 +18,7 @@ * 5. Modifications may be freely made to this file if the above conditions * are met. * - * $Id: vm_zone.c,v 1.10 1997/10/12 20:26:33 phk Exp $ + * $Id: vm_zone.c,v 1.11 1997/12/05 19:55:52 bde Exp $ */ #include @@ -83,7 +83,7 @@ zinitna(vm_zone_t z, vm_object_t obj, char *name, int size, int totsize; if ((z->zflags & ZONE_BOOT) == 0) { - z->zsize = (size + 32 - 1) & ~(32 - 1); + z->zsize = (size + ZONE_ROUNDING - 1) & ~(ZONE_ROUNDING - 1); simple_lock_init(&z->zlock); z->zfreecnt = 0; z->ztotal = 0; @@ -366,6 +366,11 @@ sysctl_vm_zone SYSCTL_HANDLER_ARGS char tmpbuf[128]; char tmpname[14]; + sprintf(tmpbuf, "\nITEM SIZE LIMIT USED FREE REQUESTS\n"); + error = SYSCTL_OUT(req, tmpbuf, strlen(tmpbuf)); + if (error) + return (error); + for (curzone = zlist; curzone; curzone = nextzone) { int i; int len; @@ -387,8 +392,8 @@ sysctl_vm_zone SYSCTL_HANDLER_ARGS } sprintf(tmpbuf + offset, - "%s limit=%8.8u, used=%6.6u, free=%6.6u, requests=%8.8u\n", - tmpname, curzone->zmax, + "%s %6.6u, %8.8u, %6.6u, %6.6u, %8.8u\n", + tmpname, curzone->zsize, curzone->zmax, (curzone->ztotal - curzone->zfreecnt), curzone->zfreecnt, curzone->znalloc); diff --git a/sys/vm/vm_zone.h b/sys/vm/vm_zone.h index 58d29bf15f8c..e1e850ff6e45 100644 --- a/sys/vm/vm_zone.h +++ b/sys/vm/vm_zone.h @@ -18,7 +18,7 @@ * 5. Modifications may be freely made to this file if the above conditions * are met. * - * $Id: vm_zone.h,v 1.7 1997/09/21 11:41:12 peter Exp $ + * $Id: vm_zone.h,v 1.8 1997/12/05 19:55:52 bde Exp $ */ #if !defined(_SYS_ZONE_H) @@ -68,6 +68,7 @@ void * _zget __P((vm_zone_t z)); #define ZONE_ERROR_NOTFREE 1 #define ZONE_ERROR_ALREADYFREE 2 +#define ZONE_ROUNDING 32 #define ZENTRY_FREE 0x12342378 /*