From 36e7a51ea1dedf0fc860ff3106aee1db1ab3b1f5 Mon Sep 17 00:00:00 2001 From: phk Date: Sun, 12 Oct 1997 20:26:33 +0000 Subject: Last major round (Unless Bruce thinks of somthing :-) of malloc changes. Distribute all but the most fundamental malloc types. This time I also remembered the trick to making things static: Put "static" in front of them. A couple of finer points by: bde --- sys/amd64/amd64/machdep.c | 3 ++- sys/dev/rp/rp.c | 2 +- sys/dev/sio/sio.c | 4 ++-- sys/dev/snp/snp.c | 2 +- sys/fs/cd9660/cd9660_node.h | 7 +++++- sys/fs/cd9660/cd9660_vfsops.c | 4 +++- sys/fs/fdescfs/fdesc_vfsops.c | 8 ++++--- sys/fs/fifofs/fifo_vnops.c | 4 ++-- sys/fs/msdosfs/msdosfs_denode.c | 4 ++-- sys/fs/msdosfs/msdosfs_vfsops.c | 5 ++-- sys/fs/msdosfs/msdosfsmount.h | 6 ++++- sys/fs/nullfs/null_vfsops.c | 12 ++++++---- sys/fs/portalfs/portal_vfsops.c | 10 ++++---- sys/fs/umapfs/umap_vfsops.c | 10 ++++---- sys/fs/unionfs/union_vfsops.c | 10 ++++---- sys/gnu/ext2fs/ext2_ihash.c | 5 ++-- sys/gnu/ext2fs/ext2_mount.h | 7 +++++- sys/gnu/ext2fs/ext2_vfsops.c | 2 +- sys/gnu/fs/ext2fs/ext2_mount.h | 7 +++++- sys/gnu/fs/ext2fs/ext2_vfsops.c | 2 +- sys/i386/i386/machdep.c | 3 ++- sys/i386/i386/userconfig.c | 6 ++--- sys/i386/isa/rp.c | 2 +- sys/i386/isa/sio.c | 4 ++-- sys/isa/sio.c | 4 ++-- sys/isofs/cd9660/cd9660_node.h | 7 +++++- sys/isofs/cd9660/cd9660_vfsops.c | 4 +++- sys/kern/inflate.c | 4 ++-- sys/kern/kern_descrip.c | 6 +++-- sys/kern/kern_exit.c | 6 ++--- sys/kern/kern_ktrace.c | 4 ++-- sys/kern/kern_lockf.c | 4 ++-- sys/kern/kern_malloc.c | 4 +++- sys/kern/kern_proc.c | 7 ++++-- sys/kern/kern_prot.c | 4 +++- sys/kern/kern_sysctl.c | 4 ++-- sys/kern/subr_clist.c | 4 ++-- sys/kern/subr_prf.c | 4 ++-- sys/kern/subr_prof.c | 4 ++-- sys/kern/sys_generic.c | 7 +++--- sys/kern/sysv_shm.c | 4 ++-- sys/kern/tty.c | 4 +++- sys/kern/tty_snoop.c | 2 +- sys/kern/tty_subr.c | 4 ++-- sys/kern/uipc_mbuf.c | 3 +-- sys/kern/uipc_socket.c | 6 ++++- sys/kern/uipc_syscalls.c | 4 ++-- sys/kern/uipc_usrreq.c | 4 +++- sys/kern/vfs_aio.c | 4 ++-- sys/kern/vfs_bio.c | 4 ++-- sys/kern/vfs_conf.c | 4 +++- sys/kern/vfs_export.c | 6 ++--- sys/kern/vfs_extattr.c | 4 ++-- sys/kern/vfs_init.c | 4 +++- sys/kern/vfs_mount.c | 4 +++- sys/kern/vfs_subr.c | 6 ++--- sys/kern/vfs_syscalls.c | 4 ++-- sys/miscfs/devfs/devfs_tree.c | 8 +++---- sys/miscfs/devfs/devfs_vfsops.c | 4 ++-- sys/miscfs/fdesc/fdesc_vfsops.c | 8 ++++--- sys/miscfs/fifofs/fifo_vnops.c | 4 ++-- sys/miscfs/kernfs/kernfs_vfsops.c | 10 ++++---- sys/miscfs/nullfs/null_vfsops.c | 12 ++++++---- sys/miscfs/portal/portal_vfsops.c | 10 ++++---- sys/miscfs/umapfs/umap_vfsops.c | 10 ++++---- sys/miscfs/union/union_vfsops.c | 10 ++++---- sys/msdosfs/msdosfs_denode.c | 4 ++-- sys/msdosfs/msdosfs_vfsops.c | 5 ++-- sys/msdosfs/msdosfsmount.h | 6 ++++- sys/net/hostcache.c | 4 +++- sys/net/hostcache.h | 6 ++++- sys/net/if.c | 4 +++- sys/net/if.h | 9 ++++++- sys/net/radix.h | 6 ++++- sys/net/rtsock.c | 4 +++- sys/netinet/igmp.c | 4 ++-- sys/netinet/in.c | 4 ++-- sys/netinet/ip_fw.c | 4 +++- sys/netinet/ip_output.c | 4 ++-- sys/netkey/key.c | 2 +- sys/netnatm/natm_pcb.c | 2 +- sys/nfs/krpc_subr.c | 4 ++-- sys/nfs/nfs.h | 13 +++++++++- sys/nfs/nfs_node.c | 4 ++-- sys/nfs/nfs_nqlease.c | 6 ++--- sys/nfs/nfs_socket.c | 4 ++-- sys/nfs/nfs_srvcache.c | 4 ++-- sys/nfs/nfs_syscalls.c | 6 ++--- sys/nfs/nfs_vfsops.c | 13 ++++++++-- sys/nfsclient/krpc_subr.c | 4 ++-- sys/nfsclient/nfs.h | 13 +++++++++- sys/nfsclient/nfs_nfsiod.c | 6 ++--- sys/nfsclient/nfs_node.c | 4 ++-- sys/nfsclient/nfs_socket.c | 4 ++-- sys/nfsclient/nfs_vfsops.c | 13 ++++++++-- sys/nfsclient/nfsargs.h | 13 +++++++++- sys/nfsclient/nfsstats.h | 13 +++++++++- sys/nfsserver/nfs.h | 13 +++++++++- sys/nfsserver/nfs_srvcache.c | 4 ++-- sys/nfsserver/nfs_srvsock.c | 4 ++-- sys/nfsserver/nfs_syscalls.c | 6 ++--- sys/nfsserver/nfsrvstats.h | 13 +++++++++- sys/sys/filedesc.h | 5 +++- sys/sys/malloc.h | 50 ++++++--------------------------------- sys/sys/mbuf.h | 25 ++------------------ sys/sys/mount.h | 5 +++- sys/sys/proc.h | 9 ++++++- sys/sys/socket.h | 7 +++++- sys/sys/tty.h | 5 +++- sys/sys/vnode.h | 7 +++++- sys/ufs/ffs/ffs_vfsops.c | 4 ++-- sys/ufs/lfs/lfs_extern.h | 5 +++- sys/ufs/lfs/lfs_vfsops.c | 7 ++++-- sys/ufs/mfs/mfs_vfsops.c | 4 ++-- sys/ufs/ufs/ufs_ihash.c | 5 ++-- sys/ufs/ufs/ufs_quota.c | 4 ++-- sys/ufs/ufs/ufs_vfsops.c | 4 +++- sys/ufs/ufs/ufsmount.h | 7 +++++- sys/vm/vm_map.c | 4 ++-- sys/vm/vm_pager.c | 5 +++- sys/vm/vm_pager.h | 7 +++++- sys/vm/vm_zone.c | 4 ++-- 122 files changed, 469 insertions(+), 289 deletions(-) (limited to 'sys') diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c index 01600cf..0ab6bca 100644 --- a/sys/amd64/amd64/machdep.c +++ b/sys/amd64/amd64/machdep.c @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * from: @(#)machdep.c 7.4 (Berkeley) 6/3/91 - * $Id: machdep.c,v 1.267 1997/10/10 09:44:02 peter Exp $ + * $Id: machdep.c,v 1.268 1997/10/10 12:42:52 peter Exp $ */ #include "apm.h" @@ -134,6 +134,7 @@ extern void initializecpu(void); static void cpu_startup __P((void *)); SYSINIT(cpu, SI_SUB_CPU, SI_ORDER_FIRST, cpu_startup, NULL) +static MALLOC_DEFINE(M_MBUF, "mbuf", "mbuf"); #ifdef BOUNCE_BUFFERS extern char *bouncememory; diff --git a/sys/dev/rp/rp.c b/sys/dev/rp/rp.c index 0403e89..580e4cc 100644 --- a/sys/dev/rp/rp.c +++ b/sys/dev/rp/rp.c @@ -37,11 +37,11 @@ #include #include #include +#include #include #include #include #include -#include #include diff --git a/sys/dev/sio/sio.c b/sys/dev/sio/sio.c index 21beb8c..39c6470 100644 --- a/sys/dev/sio/sio.c +++ b/sys/dev/sio/sio.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * from: @(#)com.c 7.5 (Berkeley) 5/16/91 - * $Id: sio.c,v 1.182 1997/09/19 15:25:49 jmg Exp $ + * $Id: sio.c,v 1.183 1997/09/21 21:41:40 gibbs Exp $ */ #include "opt_comconsole.h" @@ -62,13 +62,13 @@ #include #include #include +#include #include #include #include #include #include #include -#include #include #include #ifdef DEVFS diff --git a/sys/dev/snp/snp.c b/sys/dev/snp/snp.c index 42f23f3..98ac903 100644 --- a/sys/dev/snp/snp.c +++ b/sys/dev/snp/snp.c @@ -22,13 +22,13 @@ #include #include /* Oooh..We need O/NTTYDISC */ #include +#include #include #include #include #include #include #include -#include #ifdef DEVFS #include #endif /*DEVFS*/ diff --git a/sys/fs/cd9660/cd9660_node.h b/sys/fs/cd9660/cd9660_node.h index a1ab0b1..92e214f 100644 --- a/sys/fs/cd9660/cd9660_node.h +++ b/sys/fs/cd9660/cd9660_node.h @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)cd9660_node.h 8.6 (Berkeley) 5/14/95 - * $Id: cd9660_node.h,v 1.11 1997/04/14 18:15:45 phk Exp $ + * $Id: cd9660_node.h,v 1.12 1997/08/26 07:32:31 phk Exp $ */ /* @@ -92,6 +92,11 @@ struct iso_node { #define VTOI(vp) ((struct iso_node *)(vp)->v_data) #define ITOV(ip) ((ip)->i_vnode) +#ifdef MALLOC_DECLARE +MALLOC_DECLARE(M_ISOFSMNT); +MALLOC_DECLARE(M_ISOFSNODE); +#endif + /* * Prototypes for ISOFS vnode operations */ diff --git a/sys/fs/cd9660/cd9660_vfsops.c b/sys/fs/cd9660/cd9660_vfsops.c index b29a042..3d23f09 100644 --- a/sys/fs/cd9660/cd9660_vfsops.c +++ b/sys/fs/cd9660/cd9660_vfsops.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)cd9660_vfsops.c 8.18 (Berkeley) 5/22/95 - * $Id: cd9660_vfsops.c,v 1.28 1997/09/07 16:20:42 bde Exp $ + * $Id: cd9660_vfsops.c,v 1.29 1997/09/27 13:38:48 kato Exp $ */ #include @@ -59,6 +59,8 @@ #include #include +MALLOC_DEFINE(M_ISOFSMNT, "ISOFS mount", "ISOFS mount structure"); +MALLOC_DEFINE(M_ISOFSNODE, "ISOFS node", "ISOFS vnode private part"); static int cd9660_mount __P((struct mount *, char *, caddr_t, struct nameidata *, struct proc *)); diff --git a/sys/fs/fdescfs/fdesc_vfsops.c b/sys/fs/fdescfs/fdesc_vfsops.c index e80c69d..b57b236 100644 --- a/sys/fs/fdescfs/fdesc_vfsops.c +++ b/sys/fs/fdescfs/fdesc_vfsops.c @@ -35,7 +35,7 @@ * * @(#)fdesc_vfsops.c 8.4 (Berkeley) 1/21/94 * - * $Id: fdesc_vfsops.c,v 1.11 1997/08/02 14:31:59 bde Exp $ + * $Id: fdesc_vfsops.c,v 1.12 1997/08/16 19:15:12 wollman Exp $ */ /* @@ -53,6 +53,8 @@ #include #include +static MALLOC_DEFINE(M_FDESCMNT, "FDESC mount", "FDESC mount structure"); + static int fdesc_fhtovp __P((struct mount *mp, struct fid *fhp, struct mbuf *nam, struct vnode **vpp, int *exflagsp, struct ucred **credanonp)); @@ -98,7 +100,7 @@ fdesc_mount(mp, path, data, ndp, p) return (error); MALLOC(fmp, struct fdescmount *, sizeof(struct fdescmount), - M_UFSMNT, M_WAITOK); /* XXX */ + M_FDESCMNT, M_WAITOK); /* XXX */ rvp->v_type = VDIR; rvp->v_flag |= VROOT; fmp->f_root = rvp; @@ -158,7 +160,7 @@ fdesc_unmount(mp, mntflags, p) /* * Finally, throw away the fdescmount structure */ - free(mp->mnt_data, M_UFSMNT); /* XXX */ + free(mp->mnt_data, M_FDESCMNT); /* XXX */ mp->mnt_data = 0; return (0); diff --git a/sys/fs/fifofs/fifo_vnops.c b/sys/fs/fifofs/fifo_vnops.c index bab3f53..27553a9 100644 --- a/sys/fs/fifofs/fifo_vnops.c +++ b/sys/fs/fifofs/fifo_vnops.c @@ -31,20 +31,20 @@ * SUCH DAMAGE. * * @(#)fifo_vnops.c 8.10 (Berkeley) 5/27/95 - * $Id: fifo_vnops.c,v 1.26 1997/09/02 20:06:11 bde Exp $ + * $Id: fifo_vnops.c,v 1.27 1997/09/14 02:57:53 peter Exp $ */ #include #include #include #include +#include #include #include #include #include #include #include -#include #include #include #include diff --git a/sys/fs/msdosfs/msdosfs_denode.c b/sys/fs/msdosfs/msdosfs_denode.c index 2c3876b..fc2d3db 100644 --- a/sys/fs/msdosfs/msdosfs_denode.c +++ b/sys/fs/msdosfs/msdosfs_denode.c @@ -1,4 +1,4 @@ -/* $Id: msdosfs_denode.c,v 1.26 1997/09/02 20:06:15 bde Exp $ */ +/* $Id: msdosfs_denode.c,v 1.27 1997/10/11 18:31:30 phk Exp $ */ /* $NetBSD: msdosfs_denode.c,v 1.9 1994/08/21 18:44:00 ws Exp $ */ /*- @@ -66,7 +66,7 @@ #include #include -MALLOC_DEFINE(M_MSDOSFSNODE, "MSDOSFS node", "MSDOSFS vnode private part"); +static MALLOC_DEFINE(M_MSDOSFSNODE, "MSDOSFS node", "MSDOSFS vnode private part"); struct denode **dehashtbl; u_long dehash; /* size of hash table - 1 */ diff --git a/sys/fs/msdosfs/msdosfs_vfsops.c b/sys/fs/msdosfs/msdosfs_vfsops.c index c0d287c..9cebfb2 100644 --- a/sys/fs/msdosfs/msdosfs_vfsops.c +++ b/sys/fs/msdosfs/msdosfs_vfsops.c @@ -1,4 +1,4 @@ -/* $Id: msdosfs_vfsops.c,v 1.20 1997/08/16 19:15:24 wollman Exp $ */ +/* $Id: msdosfs_vfsops.c,v 1.21 1997/10/11 18:31:30 phk Exp $ */ /* $NetBSD: msdosfs_vfsops.c,v 1.19 1994/08/21 18:44:10 ws Exp $ */ /*- @@ -67,7 +67,8 @@ #include #include -MALLOC_DEFINE(M_MSDOSFSFAT, "MSDOSFS FAT", "MSDOSFS file allocation table"); +MALLOC_DEFINE(M_MSDOSFSMNT, "MSDOSFS mount", "MSDOSFS mount structure"); +static MALLOC_DEFINE(M_MSDOSFSFAT, "MSDOSFS FAT", "MSDOSFS file allocation table"); static int mountmsdosfs __P((struct vnode *devvp, struct mount *mp, struct proc *p)); diff --git a/sys/fs/msdosfs/msdosfsmount.h b/sys/fs/msdosfs/msdosfsmount.h index 0ab41b4..49a9327 100644 --- a/sys/fs/msdosfs/msdosfsmount.h +++ b/sys/fs/msdosfs/msdosfsmount.h @@ -1,4 +1,4 @@ -/* $Id: msdosfsmount.h,v 1.10 1997/02/22 09:40:49 peter Exp $ */ +/* $Id: msdosfsmount.h,v 1.11 1997/03/03 17:36:11 bde Exp $ */ /* $NetBSD: msdosfsmount.h,v 1.7 1994/08/21 18:44:17 ws Exp $ */ /*- @@ -53,6 +53,10 @@ #ifdef KERNEL +#ifdef MALLOC_DECLARE +MALLOC_DECLARE(M_MSDOSFSMNT); +#endif + /* * Layout of the mount control block for a msdos file system. */ diff --git a/sys/fs/nullfs/null_vfsops.c b/sys/fs/nullfs/null_vfsops.c index ea5711f..29be50a 100644 --- a/sys/fs/nullfs/null_vfsops.c +++ b/sys/fs/nullfs/null_vfsops.c @@ -36,7 +36,7 @@ * @(#)null_vfsops.c 8.2 (Berkeley) 1/21/94 * * @(#)lofs_vfsops.c 1.2 (Berkeley) 6/18/92 - * $Id: null_vfsops.c,v 1.18 1997/08/02 14:32:05 bde Exp $ + * $Id: null_vfsops.c,v 1.19 1997/08/16 19:15:16 wollman Exp $ */ /* @@ -48,12 +48,14 @@ #include #include #include +#include #include #include #include -#include #include +static MALLOC_DEFINE(M_NULLFSMNT, "NULLFS mount", "NULLFS mount structure"); + static int nullfs_fhtovp __P((struct mount *mp, struct fid *fidp, struct sockaddr *nam, struct vnode **vpp, int *exflagsp, struct ucred **credanonp)); @@ -154,7 +156,7 @@ nullfs_mount(mp, path, data, ndp, p) } xmp = (struct null_mount *) malloc(sizeof(struct null_mount), - M_UFSMNT, M_WAITOK); /* XXX */ + M_NULLFSMNT, M_WAITOK); /* XXX */ /* * Save reference to underlying FS @@ -175,7 +177,7 @@ nullfs_mount(mp, path, data, ndp, p) */ if (error) { vrele(lowerrootvp); - free(xmp, M_UFSMNT); /* XXX */ + free(xmp, M_NULLFSMNT); /* XXX */ return (error); } @@ -268,7 +270,7 @@ nullfs_unmount(mp, mntflags, p) /* * Finally, throw away the null_mount structure */ - free(mp->mnt_data, M_UFSMNT); /* XXX */ + free(mp->mnt_data, M_NULLFSMNT); /* XXX */ mp->mnt_data = 0; return 0; } diff --git a/sys/fs/portalfs/portal_vfsops.c b/sys/fs/portalfs/portal_vfsops.c index c70e73e..15e81b6 100644 --- a/sys/fs/portalfs/portal_vfsops.c +++ b/sys/fs/portalfs/portal_vfsops.c @@ -35,7 +35,7 @@ * * @(#)portal_vfsops.c 8.11 (Berkeley) 5/14/95 * - * $Id: portal_vfsops.c,v 1.16 1997/08/02 14:32:07 bde Exp $ + * $Id: portal_vfsops.c,v 1.17 1997/08/16 19:15:17 wollman Exp $ */ /* @@ -57,6 +57,8 @@ #include #include +static MALLOC_DEFINE(M_PORTALFSMNT, "PORTAL mount", "PORTAL mount structure"); + static int portal_init __P((struct vfsconf *)); static int portal_mount __P((struct mount *mp, char *path, caddr_t data, struct nameidata *ndp, struct proc *p)); @@ -116,11 +118,11 @@ portal_mount(mp, path, data, ndp, p) M_TEMP, M_WAITOK); MALLOC(fmp, struct portalmount *, sizeof(struct portalmount), - M_UFSMNT, M_WAITOK); /* XXX */ + M_PORTALFSMNT, M_WAITOK); /* XXX */ error = getnewvnode(VT_PORTAL, mp, portal_vnodeop_p, &rvp); /* XXX */ if (error) { - FREE(fmp, M_UFSMNT); + FREE(fmp, M_PORTALFSMNT); FREE(pn, M_TEMP); return (error); } @@ -213,7 +215,7 @@ portal_unmount(mp, mntflags, p) /* * Finally, throw away the portalmount structure */ - free(mp->mnt_data, M_UFSMNT); /* XXX */ + free(mp->mnt_data, M_PORTALFSMNT); /* XXX */ mp->mnt_data = 0; return (0); } diff --git a/sys/fs/umapfs/umap_vfsops.c b/sys/fs/umapfs/umap_vfsops.c index 20c0c4c..0281678 100644 --- a/sys/fs/umapfs/umap_vfsops.c +++ b/sys/fs/umapfs/umap_vfsops.c @@ -35,7 +35,7 @@ * * @(#)umap_vfsops.c 8.8 (Berkeley) 5/14/95 * - * $Id: umap_vfsops.c,v 1.15 1997/08/02 14:32:25 bde Exp $ + * $Id: umap_vfsops.c,v 1.16 1997/08/16 19:15:21 wollman Exp $ */ /* @@ -53,6 +53,8 @@ #include #include +static MALLOC_DEFINE(M_UMAPFSMNT, "UMAP mount", "UMAP mount structure"); + static int umapfs_fhtovp __P((struct mount *mp, struct fid *fidp, struct sockaddr *nam, struct vnode **vpp, int *exflagsp, struct ucred **credanonp)); @@ -138,7 +140,7 @@ umapfs_mount(mp, path, data, ndp, p) #endif amp = (struct umap_mount *) malloc(sizeof(struct umap_mount), - M_UFSMNT, M_WAITOK); /* XXX */ + M_UMAPFSMNT, M_WAITOK); /* XXX */ /* * Save reference to underlying FS @@ -190,7 +192,7 @@ umapfs_mount(mp, path, data, ndp, p) */ if (error) { vrele(lowerrootvp); - free(amp, M_UFSMNT); /* XXX */ + free(amp, M_UMAPFSMNT); /* XXX */ return (error); } @@ -283,7 +285,7 @@ umapfs_unmount(mp, mntflags, p) /* * Finally, throw away the umap_mount structure */ - free(mp->mnt_data, M_UFSMNT); /* XXX */ + free(mp->mnt_data, M_UMAPFSMNT); /* XXX */ mp->mnt_data = 0; return (0); } diff --git a/sys/fs/unionfs/union_vfsops.c b/sys/fs/unionfs/union_vfsops.c index 8478a1c..5ace7ce 100644 --- a/sys/fs/unionfs/union_vfsops.c +++ b/sys/fs/unionfs/union_vfsops.c @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * @(#)union_vfsops.c 8.20 (Berkeley) 5/20/95 - * $Id: union_vfsops.c,v 1.19 1997/08/16 19:15:22 wollman Exp $ + * $Id: union_vfsops.c,v 1.20 1997/09/27 13:39:29 kato Exp $ */ /* @@ -53,6 +53,8 @@ #include #include +static MALLOC_DEFINE(M_UNIONFSMNT, "UNION mount", "UNION mount structure"); + extern int union_init __P((struct vfsconf *)); extern int union_fhtovp __P((struct mount *mp, struct fid *fidp, @@ -176,7 +178,7 @@ union_mount(mp, path, data, ndp, p) } um = (struct union_mount *) malloc(sizeof(struct union_mount), - M_UFSMNT, M_WAITOK); /* XXX */ + M_UNIONFSMNT, M_WAITOK); /* XXX */ /* * Keep a held reference to the target vnodes. @@ -286,7 +288,7 @@ union_mount(mp, path, data, ndp, p) bad: if (um) - free(um, M_UFSMNT); + free(um, M_UNIONFSMNT); if (cred) crfree(cred); if (upperrootvp) @@ -390,7 +392,7 @@ union_unmount(mp, mntflags, p) /* * Finally, throw away the union_mount structure */ - free(mp->mnt_data, M_UFSMNT); /* XXX */ + free(mp->mnt_data, M_UNIONFSMNT); /* XXX */ mp->mnt_data = 0; return (0); } diff --git a/sys/gnu/ext2fs/ext2_ihash.c b/sys/gnu/ext2fs/ext2_ihash.c index 5ff8f34..83b29d4 100644 --- a/sys/gnu/ext2fs/ext2_ihash.c +++ b/sys/gnu/ext2fs/ext2_ihash.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)ufs_ihash.c 8.7 (Berkeley) 5/17/95 - * $Id$ + * $Id: ufs_ihash.c,v 1.8 1997/02/22 09:47:47 peter Exp $ */ #include @@ -44,6 +44,7 @@ #include #include +static MALLOC_DEFINE(M_UFSIHASH, "UFS ihash", "UFS Inode hash tables"); /* * Structures associated with inode cacheing. */ @@ -59,7 +60,7 @@ void ufs_ihashinit() { - ihashtbl = hashinit(desiredvnodes, M_UFSMNT, &ihash); + ihashtbl = hashinit(desiredvnodes, M_UFSIHASH, &ihash); simple_lock_init(&ufs_ihash_slock); } diff --git a/sys/gnu/ext2fs/ext2_mount.h b/sys/gnu/ext2fs/ext2_mount.h index 2761f65..d57dd59 100644 --- a/sys/gnu/ext2fs/ext2_mount.h +++ b/sys/gnu/ext2fs/ext2_mount.h @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)ufsmount.h 8.6 (Berkeley) 3/30/95 - * $Id: ufsmount.h,v 1.8 1997/09/22 21:24:03 joerg Exp $ + * $Id: ufsmount.h,v 1.9 1997/10/10 18:18:13 phk Exp $ */ #ifndef _UFS_UFS_UFSMOUNT_H_ @@ -56,6 +56,11 @@ struct mfs_args { }; #ifdef KERNEL + +#ifdef MALLOC_DECLARE +MALLOC_DECLARE(M_UFSMNT); +#endif + struct buf; struct inode; struct nameidata; diff --git a/sys/gnu/ext2fs/ext2_vfsops.c b/sys/gnu/ext2fs/ext2_vfsops.c index 950d636..39554f8 100644 --- a/sys/gnu/ext2fs/ext2_vfsops.c +++ b/sys/gnu/ext2fs/ext2_vfsops.c @@ -86,7 +86,7 @@ static int ext2_unmount __P((struct mount *, int, struct proc *)); static int ext2_vget __P((struct mount *, ino_t, struct vnode **)); static int ext2_vptofh __P((struct vnode *, struct fid *)); -MALLOC_DEFINE(M_EXT2NODE, "EXT2 nodes", "EXT2 Filsystem inodes"); +static MALLOC_DEFINE(M_EXT2NODE, "EXT2 nodes", "EXT2 Filsystem inodes"); static struct vfsops ext2fs_vfsops = { ext2_mount, diff --git a/sys/gnu/fs/ext2fs/ext2_mount.h b/sys/gnu/fs/ext2fs/ext2_mount.h index 2761f65..d57dd59 100644 --- a/sys/gnu/fs/ext2fs/ext2_mount.h +++ b/sys/gnu/fs/ext2fs/ext2_mount.h @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)ufsmount.h 8.6 (Berkeley) 3/30/95 - * $Id: ufsmount.h,v 1.8 1997/09/22 21:24:03 joerg Exp $ + * $Id: ufsmount.h,v 1.9 1997/10/10 18:18:13 phk Exp $ */ #ifndef _UFS_UFS_UFSMOUNT_H_ @@ -56,6 +56,11 @@ struct mfs_args { }; #ifdef KERNEL + +#ifdef MALLOC_DECLARE +MALLOC_DECLARE(M_UFSMNT); +#endif + struct buf; struct inode; struct nameidata; diff --git a/sys/gnu/fs/ext2fs/ext2_vfsops.c b/sys/gnu/fs/ext2fs/ext2_vfsops.c index 950d636..39554f8 100644 --- a/sys/gnu/fs/ext2fs/ext2_vfsops.c +++ b/sys/gnu/fs/ext2fs/ext2_vfsops.c @@ -86,7 +86,7 @@ static int ext2_unmount __P((struct mount *, int, struct proc *)); static int ext2_vget __P((struct mount *, ino_t, struct vnode **)); static int ext2_vptofh __P((struct vnode *, struct fid *)); -MALLOC_DEFINE(M_EXT2NODE, "EXT2 nodes", "EXT2 Filsystem inodes"); +static MALLOC_DEFINE(M_EXT2NODE, "EXT2 nodes", "EXT2 Filsystem inodes"); static struct vfsops ext2fs_vfsops = { ext2_mount, diff --git a/sys/i386/i386/machdep.c b/sys/i386/i386/machdep.c index 01600cf..0ab6bca 100644 --- a/sys/i386/i386/machdep.c +++ b/sys/i386/i386/machdep.c @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * from: @(#)machdep.c 7.4 (Berkeley) 6/3/91 - * $Id: machdep.c,v 1.267 1997/10/10 09:44:02 peter Exp $ + * $Id: machdep.c,v 1.268 1997/10/10 12:42:52 peter Exp $ */ #include "apm.h" @@ -134,6 +134,7 @@ extern void initializecpu(void); static void cpu_startup __P((void *)); SYSINIT(cpu, SI_SUB_CPU, SI_ORDER_FIRST, cpu_startup, NULL) +static MALLOC_DEFINE(M_MBUF, "mbuf", "mbuf"); #ifdef BOUNCE_BUFFERS extern char *bouncememory; diff --git a/sys/i386/i386/userconfig.c b/sys/i386/i386/userconfig.c index 5918a60..2aba045 100644 --- a/sys/i386/i386/userconfig.c +++ b/sys/i386/i386/userconfig.c @@ -46,7 +46,7 @@ ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF ** THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ** - ** $Id: userconfig.c,v 1.93 1997/09/18 08:00:48 jmg Exp $ + ** $Id: userconfig.c,v 1.94 1997/10/11 18:31:19 phk Exp $ **/ /** @@ -126,7 +126,7 @@ #include -MALLOC_DEFINE(M_DEVL, "isa_devlist", "isa_device lists in userconfig()"); +static MALLOC_DEFINE(M_DEVL, "isa_devlist", "isa_device lists in userconfig()"); static struct isa_device *isa_devlist; /* list read by dset to extract changes */ @@ -2367,7 +2367,7 @@ visuserconfig(void) * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: userconfig.c,v 1.93 1997/09/18 08:00:48 jmg Exp $ + * $Id: userconfig.c,v 1.94 1997/10/11 18:31:19 phk Exp $ */ #include "scbus.h" diff --git a/sys/i386/isa/rp.c b/sys/i386/isa/rp.c index 0403e89..580e4cc 100644 --- a/sys/i386/isa/rp.c +++ b/sys/i386/isa/rp.c @@ -37,11 +37,11 @@ #include #include #include +#include #include #include #include #include -#include #include diff --git a/sys/i386/isa/sio.c b/sys/i386/isa/sio.c index 21beb8c..39c6470 100644 --- a/sys/i386/isa/sio.c +++ b/sys/i386/isa/sio.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * from: @(#)com.c 7.5 (Berkeley) 5/16/91 - * $Id: sio.c,v 1.182 1997/09/19 15:25:49 jmg Exp $ + * $Id: sio.c,v 1.183 1997/09/21 21:41:40 gibbs Exp $ */ #include "opt_comconsole.h" @@ -62,13 +62,13 @@ #include #include #include +#include #include #include #include #include #include #include -#include #include #include #ifdef DEVFS diff --git a/sys/isa/sio.c b/sys/isa/sio.c index 21beb8c..39c6470 100644 --- a/sys/isa/sio.c +++ b/sys/isa/sio.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * from: @(#)com.c 7.5 (Berkeley) 5/16/91 - * $Id: sio.c,v 1.182 1997/09/19 15:25:49 jmg Exp $ + * $Id: sio.c,v 1.183 1997/09/21 21:41:40 gibbs Exp $ */ #include "opt_comconsole.h" @@ -62,13 +62,13 @@ #include #include #include +#include #include #include #include #include #include #include -#include #include #include #ifdef DEVFS diff --git a/sys/isofs/cd9660/cd9660_node.h b/sys/isofs/cd9660/cd9660_node.h index a1ab0b1..92e214f 100644 --- a/sys/isofs/cd9660/cd9660_node.h +++ b/sys/isofs/cd9660/cd9660_node.h @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)cd9660_node.h 8.6 (Berkeley) 5/14/95 - * $Id: cd9660_node.h,v 1.11 1997/04/14 18:15:45 phk Exp $ + * $Id: cd9660_node.h,v 1.12 1997/08/26 07:32:31 phk Exp $ */ /* @@ -92,6 +92,11 @@ struct iso_node { #define VTOI(vp) ((struct iso_node *)(vp)->v_data) #define ITOV(ip) ((ip)->i_vnode) +#ifdef MALLOC_DECLARE +MALLOC_DECLARE(M_ISOFSMNT); +MALLOC_DECLARE(M_ISOFSNODE); +#endif + /* * Prototypes for ISOFS vnode operations */ diff --git a/sys/isofs/cd9660/cd9660_vfsops.c b/sys/isofs/cd9660/cd9660_vfsops.c index b29a042..3d23f09 100644 --- a/sys/isofs/cd9660/cd9660_vfsops.c +++ b/sys/isofs/cd9660/cd9660_vfsops.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)cd9660_vfsops.c 8.18 (Berkeley) 5/22/95 - * $Id: cd9660_vfsops.c,v 1.28 1997/09/07 16:20:42 bde Exp $ + * $Id: cd9660_vfsops.c,v 1.29 1997/09/27 13:38:48 kato Exp $ */ #include @@ -59,6 +59,8 @@ #include #include +MALLOC_DEFINE(M_ISOFSMNT, "ISOFS mount", "ISOFS mount structure"); +MALLOC_DEFINE(M_ISOFSNODE, "ISOFS node", "ISOFS vnode private part"); static int cd9660_mount __P((struct mount *, char *, caddr_t, struct nameidata *, struct proc *)); diff --git a/sys/kern/inflate.c b/sys/kern/inflate.c index 5c765e4..4558eb3 100644 --- a/sys/kern/inflate.c +++ b/sys/kern/inflate.c @@ -7,7 +7,7 @@ * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp * ---------------------------------------------------------------------------- * - * $Id: inflate.c,v 1.9 1997/08/02 14:31:25 bde Exp $ + * $Id: inflate.c,v 1.10 1997/10/11 18:31:20 phk Exp $ * * */ @@ -19,7 +19,7 @@ #endif #include -MALLOC_DEFINE(M_GZIP, "Gzip trees", "Gzip trees"); +static MALLOC_DEFINE(M_GZIP, "Gzip trees", "Gzip trees"); /* needed to make inflate() work */ #define uch u_char diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c index 442c17a..1275f0c 100644 --- a/sys/kern/kern_descrip.c +++ b/sys/kern/kern_descrip.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)kern_descrip.c 8.6 (Berkeley) 4/19/94 - * $Id: kern_descrip.c,v 1.40 1997/09/14 02:52:13 peter Exp $ + * $Id: kern_descrip.c,v 1.41 1997/10/11 18:31:22 phk Exp $ */ #include @@ -66,7 +66,9 @@ #include #endif /*DEVFS*/ -MALLOC_DEFINE(M_FILEDESC, "file desc", "Open file descriptor table"); +static MALLOC_DEFINE(M_FILEDESC, "file desc", "Open file descriptor table"); +static MALLOC_DEFINE(M_FILE, "file", "Open file structure"); + static d_open_t fdopen; #define NUMFDESC 64 diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c index 58a7d41..3d85909 100644 --- a/sys/kern/kern_exit.c +++ b/sys/kern/kern_exit.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)kern_exit.c 8.7 (Berkeley) 2/12/94 - * $Id: kern_exit.c,v 1.56 1997/09/21 22:00:10 gibbs Exp $ + * $Id: kern_exit.c,v 1.57 1997/10/11 18:31:22 phk Exp $ */ #include "opt_ktrace.h" @@ -44,11 +44,11 @@ #include #include #include +#include #include #include #include #include -#include #include #include #include @@ -70,7 +70,7 @@ #include #include -MALLOC_DEFINE(M_ZOMBIE, "zombie", "zombie proc status"); +static MALLOC_DEFINE(M_ZOMBIE, "zombie", "zombie proc status"); static int wait1 __P((struct proc *, struct wait_args *, int [], int)); diff --git a/sys/kern/kern_ktrace.c b/sys/kern/kern_ktrace.c index 3c52aed..94b650d2 100644 --- a/sys/kern/kern_ktrace.c +++ b/sys/kern/kern_ktrace.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)kern_ktrace.c 8.2 (Berkeley) 9/23/93 - * $Id: kern_ktrace.c,v 1.18 1997/03/23 03:36:19 bde Exp $ + * $Id: kern_ktrace.c,v 1.19 1997/10/11 18:31:22 phk Exp $ */ #include "opt_ktrace.h" @@ -47,7 +47,7 @@ #include #include -MALLOC_DEFINE(M_KTRACE, "KTRACE", "KTRACE"); +static MALLOC_DEFINE(M_KTRACE, "KTRACE", "KTRACE"); #ifdef KTRACE static struct ktr_header *ktrgetheader __P((int type)); diff --git a/sys/kern/kern_lockf.c b/sys/kern/kern_lockf.c index f8adbcc..a8f1a34 100644 --- a/sys/kern/kern_lockf.c +++ b/sys/kern/kern_lockf.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)ufs_lockf.c 8.3 (Berkeley) 1/6/94 - * $Id: kern_lockf.c,v 1.14 1997/04/01 10:30:06 bde Exp $ + * $Id: kern_lockf.c,v 1.15 1997/10/11 18:31:23 phk Exp $ */ #include @@ -65,7 +65,7 @@ static int lockf_debug = 0; SYSCTL_INT(_debug, OID_AUTO, lockf_debug, CTLFLAG_RW, &lockf_debug, 0, ""); #endif -MALLOC_DEFINE(M_LOCKF, "lockf", "Byte-range locking structures"); +static MALLOC_DEFINE(M_LOCKF, "lockf", "Byte-range locking structures"); #define NOLOCKF (struct lockf *)0 #define SELF 0x1 diff --git a/sys/kern/kern_malloc.c b/sys/kern/kern_malloc.c index 3bb3f3e..df84db6 100644 --- a/sys/kern/kern_malloc.c +++ b/sys/kern/kern_malloc.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)kern_malloc.c 8.3 (Berkeley) 1/4/94 - * $Id: kern_malloc.c,v 1.34 1997/10/11 10:49:43 phk Exp $ + * $Id: kern_malloc.c,v 1.35 1997/10/11 13:13:09 phk Exp $ */ #include @@ -54,6 +54,8 @@ static void kmeminit __P((void *)); static void malloc_init __P((struct malloc_type *)); SYSINIT(kmem, SI_SUB_KMEM, SI_ORDER_FIRST, kmeminit, NULL) +static MALLOC_DEFINE(M_FREE, "free", "should be on free list"); + struct malloc_type *kmemstatistics = M_FREE; static struct kmembuckets bucket[MINBUCKET + 16]; static struct kmemusage *kmemusage; diff --git a/sys/kern/kern_proc.c b/sys/kern/kern_proc.c index 1c79805..35e3046 100644 --- a/sys/kern/kern_proc.c +++ b/sys/kern/kern_proc.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)kern_proc.c 8.7 (Berkeley) 2/14/95 - * $Id: kern_proc.c,v 1.28 1997/08/02 14:31:33 bde Exp $ + * $Id: kern_proc.c,v 1.29 1997/10/11 18:31:23 phk Exp $ */ #include @@ -48,7 +48,10 @@ #include #include -MALLOC_DEFINE(M_PGRP, "pgrp", "process group header"); +static MALLOC_DEFINE(M_PGRP, "pgrp", "process group header"); +MALLOC_DEFINE(M_SESSION, "session", "session header"); +MALLOC_DEFINE(M_PROC, "proc", "Proc structures"); +MALLOC_DEFINE(M_SUBPROC, "subproc", "Proc sub-structures"); struct prochd qs[NQS]; /* as good a place as any... */ struct prochd rtqs[NQS]; /* Space for REALTIME queues too */ diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c index 3db74aa..00978e2 100644 --- a/sys/kern/kern_prot.c +++ b/sys/kern/kern_prot.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)kern_prot.c 8.6 (Berkeley) 1/21/94 - * $Id: kern_prot.c,v 1.33 1997/08/02 14:31:34 bde Exp $ + * $Id: kern_prot.c,v 1.34 1997/08/19 06:00:27 peter Exp $ */ /* @@ -51,6 +51,8 @@ #include #include +static MALLOC_DEFINE(M_CRED, "cred", "credentials"); + #ifndef _SYS_SYSPROTO_H_ struct getpid_args { int dummy; diff --git a/sys/kern/kern_sysctl.c b/sys/kern/kern_sysctl.c index 27e4e84..2b7bac3 100644 --- a/sys/kern/kern_sysctl.c +++ b/sys/kern/kern_sysctl.c @@ -37,7 +37,7 @@ * SUCH DAMAGE. * * @(#)kern_sysctl.c 8.4 (Berkeley) 4/14/94 - * $Id: kern_sysctl.c,v 1.70 1997/04/09 15:23:09 bde Exp $ + * $Id: kern_sysctl.c,v 1.71 1997/10/11 18:31:24 phk Exp $ */ #include @@ -51,7 +51,7 @@ #include #include -MALLOC_DEFINE(M_SYSCTL, "sysctl", "sysctl internal magic"); +static MALLOC_DEFINE(M_SYSCTL, "sysctl", "sysctl internal magic"); /* * Locking and stats diff --git a/sys/kern/subr_clist.c b/sys/kern/subr_clist.c index d907b47..3a806b6 100644 --- a/sys/kern/subr_clist.c +++ b/sys/kern/subr_clist.c @@ -24,7 +24,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: tty_subr.c,v 1.26 1997/03/05 16:45:01 bde Exp $ + * $Id: tty_subr.c,v 1.27 1997/03/24 11:24:37 bde Exp $ */ /* @@ -34,9 +34,9 @@ #include #include #include +#include #include #include -#include static void clist_init __P((void *)); SYSINIT(clist, SI_SUB_CLIST, SI_ORDER_FIRST, clist_init, NULL) diff --git a/sys/kern/subr_prf.c b/sys/kern/subr_prf.c index a76cf7d..f166162 100644 --- a/sys/kern/subr_prf.c +++ b/sys/kern/subr_prf.c @@ -36,17 +36,17 @@ * SUCH DAMAGE. * * @(#)subr_prf.c 8.3 (Berkeley) 1/21/94 - * $Id: subr_prf.c,v 1.41 1997/02/22 09:39:17 peter Exp $ + * $Id: subr_prf.c,v 1.42 1997/09/02 20:05:51 bde Exp $ */ #include #include #include +#include #include #include #include #include -#include #include /* diff --git a/sys/kern/subr_prof.c b/sys/kern/subr_prof.c index 09e233d..9788da6 100644 --- a/sys/kern/subr_prof.c +++ b/sys/kern/subr_prof.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)subr_prof.c 8.3 (Berkeley) 9/23/93 - * $Id: subr_prof.c,v 1.20 1997/02/22 09:39:17 peter Exp $ + * $Id: subr_prof.c,v 1.21 1997/10/11 18:31:24 phk Exp $ */ #include @@ -48,7 +48,7 @@ #include #include -MALLOC_DEFINE(M_GPROF, "gprof", "kernel profiling buffer"); +static MALLOC_DEFINE(M_GPROF, "gprof", "kernel profiling buffer"); static void kmstartup __P((void *)); SYSINIT(kmem, SI_SUB_KPROF, SI_ORDER_FIRST, kmstartup, NULL) diff --git a/sys/kern/sys_generic.c b/sys/kern/sys_generic.c index 709fe27..5b3a741 100644 --- a/sys/kern/sys_generic.c +++ b/sys/kern/sys_generic.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)sys_generic.c 8.5 (Berkeley) 1/21/94 - * $Id: sys_generic.c,v 1.29 1997/09/14 02:30:32 peter Exp $ + * $Id: sys_generic.c,v 1.30 1997/10/11 18:31:24 phk Exp $ */ #include "opt_ktrace.h" @@ -61,8 +61,9 @@ #include #endif -MALLOC_DEFINE(M_IOCTLOPS, "ioctlops", "ioctl data buffer"); -MALLOC_DEFINE(M_SELECT, "select", "select() buffer"); +static MALLOC_DEFINE(M_IOCTLOPS, "ioctlops", "ioctl data buffer"); +static MALLOC_DEFINE(M_SELECT, "select", "select() buffer"); +MALLOC_DEFINE(M_IOV, "iov", "large iov's"); static int selscan __P((struct proc *, fd_mask **, fd_mask **, int, int *)); static int pollscan __P((struct proc *, struct pollfd *, int, int *)); diff --git a/sys/kern/sysv_shm.c b/sys/kern/sysv_shm.c index 67251ea..a55d027 100644 --- a/sys/kern/sysv_shm.c +++ b/sys/kern/sysv_shm.c @@ -1,4 +1,4 @@ -/* $Id: sysv_shm.c,v 1.29 1997/08/02 14:31:39 bde Exp $ */ +/* $Id: sysv_shm.c,v 1.30 1997/10/11 18:31:25 phk Exp $ */ /* $NetBSD: sysv_shm.c,v 1.23 1994/07/04 23:25:12 glass Exp $ */ /* @@ -65,7 +65,7 @@ struct shmget_args; extern int shmget __P((struct proc *p, struct shmget_args *uap, int *retval)); #endif -MALLOC_DEFINE(M_SHM, "shm", "SVID compatible shared memory segments"); +static MALLOC_DEFINE(M_SHM, "shm", "SVID compatible shared memory segments"); static void shminit __P((void *)); SYSINIT(sysv_shm, SI_SUB_SYSV_SHM, SI_ORDER_FIRST, shminit, NULL) diff --git a/sys/kern/tty.c b/sys/kern/tty.c index 0be04a0..2bf7f20 100644 --- a/sys/kern/tty.c +++ b/sys/kern/tty.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)tty.c 8.8 (Berkeley) 1/21/94 - * $Id: tty.c,v 1.95 1997/09/02 20:05:54 bde Exp $ + * $Id: tty.c,v 1.96 1997/09/14 02:40:44 peter Exp $ */ /*- @@ -98,6 +98,8 @@ #include #include +MALLOC_DEFINE(M_TTYS, "ttys", "tty data structures"); + static int proc_compare __P((struct proc *p1, struct proc *p2)); static int ttnread __P((struct tty *tp)); static void ttyecho __P((int c, struct tty *tp)); diff --git a/sys/kern/tty_snoop.c b/sys/kern/tty_snoop.c index 42f23f3..98ac903 100644 --- a/sys/kern/tty_snoop.c +++ b/sys/kern/tty_snoop.c @@ -22,13 +22,13 @@ #include #include /* Oooh..We need O/NTTYDISC */ #include +#include #include #include #include #include #include #include -#include #ifdef DEVFS #include #endif /*DEVFS*/ diff --git a/sys/kern/tty_subr.c b/sys/kern/tty_subr.c index d907b47..3a806b6 100644 --- a/sys/kern/tty_subr.c +++ b/sys/kern/tty_subr.c @@ -24,7 +24,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: tty_subr.c,v 1.26 1997/03/05 16:45:01 bde Exp $ + * $Id: tty_subr.c,v 1.27 1997/03/24 11:24:37 bde Exp $ */ /* @@ -34,9 +34,9 @@ #include #include #include +#include #include #include -#include static void clist_init __P((void *)); SYSINIT(clist, SI_SUB_CLIST, SI_ORDER_FIRST, clist_init, NULL) diff --git a/sys/kern/uipc_mbuf.c b/sys/kern/uipc_mbuf.c index a2551bf..484e208 100644 --- a/sys/kern/uipc_mbuf.c +++ b/sys/kern/uipc_mbuf.c @@ -31,13 +31,12 @@ * SUCH DAMAGE. * * @(#)uipc_mbuf.c 8.2 (Berkeley) 1/4/94 - * $Id: uipc_mbuf.c,v 1.29 1997/02/24 20:30:55 wollman Exp $ + * $Id: uipc_mbuf.c,v 1.30 1997/08/02 14:31:41 bde Exp $ */ #include #include #include -#define MBTYPES #include #include #include diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c index 998e3f5..3aa73ed 100644 --- a/sys/kern/uipc_socket.c +++ b/sys/kern/uipc_socket.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)uipc_socket.c 8.3 (Berkeley) 4/15/94 - * $Id: uipc_socket.c,v 1.31 1997/09/14 02:34:14 peter Exp $ + * $Id: uipc_socket.c,v 1.32 1997/10/04 18:21:15 phk Exp $ */ #include @@ -52,6 +52,10 @@ #include +MALLOC_DEFINE(M_SOCKET, "socket", "socket structure"); +MALLOC_DEFINE(M_SONAME, "soname", "socket name"); +MALLOC_DEFINE(M_PCB, "pcb", "protocol control block"); + static int somaxconn = SOMAXCONN; SYSCTL_INT(_kern_ipc, KIPC_SOMAXCONN, somaxconn, CTLFLAG_RW, &somaxconn, 0, ""); diff --git a/sys/kern/uipc_syscalls.c b/sys/kern/uipc_syscalls.c index 8b18787..ed42cce 100644 --- a/sys/kern/uipc_syscalls.c +++ b/sys/kern/uipc_syscalls.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)uipc_syscalls.c 8.4 (Berkeley) 2/21/94 - * $Id: uipc_syscalls.c,v 1.29 1997/08/17 19:47:28 wollman Exp $ + * $Id: uipc_syscalls.c,v 1.30 1997/09/02 20:05:58 bde Exp $ */ #include "opt_ktrace.h" @@ -39,11 +39,11 @@ #include #include #include +#include #include #include #include #include -#include #include #include #include diff --git a/sys/kern/uipc_usrreq.c b/sys/kern/uipc_usrreq.c index 1d86d15..bbf41bf 100644 --- a/sys/kern/uipc_usrreq.c +++ b/sys/kern/uipc_usrreq.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * From: @(#)uipc_usrreq.c 8.3 (Berkeley) 1/4/94 - * $Id: uipc_usrreq.c,v 1.26 1997/09/02 20:05:59 bde Exp $ + * $Id: uipc_usrreq.c,v 1.27 1997/09/14 02:52:18 peter Exp $ */ #include @@ -53,6 +53,8 @@ #include #include +MALLOC_DEFINE(M_FILE, "file", "Open file structure"); + /* * Unix communications domain. * diff --git a/sys/kern/vfs_aio.c b/sys/kern/vfs_aio.c index 8d5c3a3..1418878 100644 --- a/sys/kern/vfs_aio.c +++ b/sys/kern/vfs_aio.c @@ -13,7 +13,7 @@ * bad that happens because of using this software isn't the responsibility * of the author. This software is distributed AS-IS. * - * $Id: vfs_aio.c,v 1.6 1997/10/11 01:07:03 dyson Exp $ + * $Id: vfs_aio.c,v 1.7 1997/10/11 18:31:25 phk Exp $ */ /* @@ -54,7 +54,7 @@ #include -MALLOC_DEFINE(M_AIO, "AIO", "AIO structure(s)"); +static MALLOC_DEFINE(M_AIO, "AIO", "AIO structure(s)"); #define AIOCBLIST_CANCELLED 0x1 #define AIOCBLIST_RUNDOWN 0x4 diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c index f7fb4f1..0630a45 100644 --- a/sys/kern/vfs_bio.c +++ b/sys/kern/vfs_bio.c @@ -18,7 +18,7 @@ * 5. Modifications may be freely made to this file if the above conditions * are met. * - * $Id: vfs_bio.c,v 1.128 1997/09/21 22:00:25 gibbs Exp $ + * $Id: vfs_bio.c,v 1.129 1997/10/11 18:31:26 phk Exp $ */ /* @@ -60,7 +60,7 @@ #include -MALLOC_DEFINE(M_BIOBUF, "BIO buffer", "BIO buffer"); +static MALLOC_DEFINE(M_BIOBUF, "BIO buffer", "BIO buffer"); static void vfs_update __P((void)); static struct proc *updateproc; diff --git a/sys/kern/vfs_conf.c b/sys/kern/vfs_conf.c index 779a1c4..faa7363 100644 --- a/sys/kern/vfs_conf.c +++ b/sys/kern/vfs_conf.c @@ -32,7 +32,7 @@ * SUCH DAMAGE. * * @(#)vfs_conf.c 8.8 (Berkeley) 3/31/94 - * $Id$ + * $Id: vfs_conf.c,v 1.14 1997/02/22 09:39:32 peter Exp $ */ /* @@ -62,6 +62,8 @@ * GLOBALS */ +MALLOC_DEFINE(M_MOUNT, "mount", "vfs mount struct"); + /* * These define the root filesystem, device, and root filesystem type. */ diff --git a/sys/kern/vfs_export.c b/sys/kern/vfs_export.c index 2969c8a..03c64d2 100644 --- a/sys/kern/vfs_export.c +++ b/sys/kern/vfs_export.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)vfs_subr.c 8.31 (Berkeley) 5/26/95 - * $Id: vfs_subr.c,v 1.108 1997/10/11 07:34:27 phk Exp $ + * $Id: vfs_subr.c,v 1.109 1997/10/11 18:31:26 phk Exp $ */ /* @@ -49,11 +49,11 @@ #include #include #include +#include #include #include #include #include -#include #include #include #include @@ -68,7 +68,7 @@ #include -MALLOC_DEFINE(M_NETADDR, "Export Host", "Export host address structure"); +static MALLOC_DEFINE(M_NETADDR, "Export Host", "Export host address structure"); #ifdef DDB extern void printlockedvnodes __P((void)); diff --git a/sys/kern/vfs_extattr.c b/sys/kern/vfs_extattr.c index 0450d16..4a01b57 100644 --- a/sys/kern/vfs_extattr.c +++ b/sys/kern/vfs_extattr.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)vfs_syscalls.c 8.13 (Berkeley) 4/15/94 - * $Id: vfs_syscalls.c,v 1.74 1997/09/27 13:39:06 kato Exp $ + * $Id: vfs_syscalls.c,v 1.75 1997/09/28 06:37:02 phk Exp $ */ /* @@ -60,9 +60,9 @@ #include #include #include +#include #include #include -#include #include #ifdef UNION diff --git a/sys/kern/vfs_init.c b/sys/kern/vfs_init.c index 6bf5f6d..03bd9a6 100644 --- a/sys/kern/vfs_init.c +++ b/sys/kern/vfs_init.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)vfs_init.c 8.3 (Berkeley) 1/4/94 - * $Id: vfs_init.c,v 1.27 1997/09/10 20:11:01 phk Exp $ + * $Id: vfs_init.c,v 1.28 1997/09/21 04:22:59 dyson Exp $ */ @@ -53,6 +53,8 @@ static void vfs_op_init __P((void)); static void vfsinit __P((void *)); SYSINIT(vfs, SI_SUB_VFS, SI_ORDER_FIRST, vfsinit, NULL) +MALLOC_DEFINE(M_VNODE, "vnodes", "Dynamically allocated vnodes"); + /* * Sigh, such primitive tools are these... */ diff --git a/sys/kern/vfs_mount.c b/sys/kern/vfs_mount.c index 779a1c4..faa7363 100644 --- a/sys/kern/vfs_mount.c +++ b/sys/kern/vfs_mount.c @@ -32,7 +32,7 @@ * SUCH DAMAGE. * * @(#)vfs_conf.c 8.8 (Berkeley) 3/31/94 - * $Id$ + * $Id: vfs_conf.c,v 1.14 1997/02/22 09:39:32 peter Exp $ */ /* @@ -62,6 +62,8 @@ * GLOBALS */ +MALLOC_DEFINE(M_MOUNT, "mount", "vfs mount struct"); + /* * These define the root filesystem, device, and root filesystem type. */ diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 2969c8a..03c64d2 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)vfs_subr.c 8.31 (Berkeley) 5/26/95 - * $Id: vfs_subr.c,v 1.108 1997/10/11 07:34:27 phk Exp $ + * $Id: vfs_subr.c,v 1.109 1997/10/11 18:31:26 phk Exp $ */ /* @@ -49,11 +49,11 @@ #include #include #include +#include #include #include #include #include -#include #include #include #include @@ -68,7 +68,7 @@ #include -MALLOC_DEFINE(M_NETADDR, "Export Host", "Export host address structure"); +static MALLOC_DEFINE(M_NETADDR, "Export Host", "Export host address structure"); #ifdef DDB extern void printlockedvnodes __P((void)); diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c index 0450d16..4a01b57 100644 --- a/sys/kern/vfs_syscalls.c +++ b/sys/kern/vfs_syscalls.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)vfs_syscalls.c 8.13 (Berkeley) 4/15/94 - * $Id: vfs_syscalls.c,v 1.74 1997/09/27 13:39:06 kato Exp $ + * $Id: vfs_syscalls.c,v 1.75 1997/09/28 06:37:02 phk Exp $ */ /* @@ -60,9 +60,9 @@ #include #include #include +#include #include #include -#include #include #ifdef UNION diff --git a/sys/miscfs/devfs/devfs_tree.c b/sys/miscfs/devfs/devfs_tree.c index b37b65e..be1deab 100644 --- a/sys/miscfs/devfs/devfs_tree.c +++ b/sys/miscfs/devfs/devfs_tree.c @@ -2,7 +2,7 @@ /* * Written by Julian Elischer (julian@DIALix.oz.au) * - * $Header: /home/ncvs/src/sys/miscfs/devfs/devfs_tree.c,v 1.42 1997/10/10 07:54:05 julian Exp $ + * $Header: /home/ncvs/src/sys/miscfs/devfs/devfs_tree.c,v 1.43 1997/10/11 18:31:28 phk Exp $ */ #include "opt_devfs.h" @@ -11,11 +11,11 @@ #include #include #include +#include #include #include #include #include -#include #include #include @@ -23,8 +23,8 @@ #include -MALLOC_DEFINE(M_DEVFSNODE, "DEVFS node", "DEVFS node"); -MALLOC_DEFINE(M_DEVFSNAME, "DEVFS name", "DEVFS name"); +static MALLOC_DEFINE(M_DEVFSNODE, "DEVFS node", "DEVFS node"); +static MALLOC_DEFINE(M_DEVFSNAME, "DEVFS name", "DEVFS name"); devnm_p dev_root; /* root of the backing tree */ struct mount *devfs_hidden_mount; diff --git a/sys/miscfs/devfs/devfs_vfsops.c b/sys/miscfs/devfs/devfs_vfsops.c index d043974..51bdd71 100644 --- a/sys/miscfs/devfs/devfs_vfsops.c +++ b/sys/miscfs/devfs/devfs_vfsops.c @@ -1,7 +1,7 @@ /* * Written by Julian Elischer (julian@DIALix.oz.au) * - * $Header: /home/ncvs/src/sys/miscfs/devfs/devfs_vfsops.c,v 1.20 1997/08/16 19:15:10 wollman Exp $ + * $Header: /home/ncvs/src/sys/miscfs/devfs/devfs_vfsops.c,v 1.21 1997/10/11 18:31:28 phk Exp $ * * */ @@ -15,7 +15,7 @@ #include -MALLOC_DEFINE(M_DEVFSMNT, "DEVFS mount", "DEVFS mount structure"); +static MALLOC_DEFINE(M_DEVFSMNT, "DEVFS mount", "DEVFS mount structure"); static int devfs_statfs( struct mount *mp, struct statfs *sbp, struct proc *p); static int mountdevfs( struct mount *mp, struct proc *p); diff --git a/sys/miscfs/fdesc/fdesc_vfsops.c b/sys/miscfs/fdesc/fdesc_vfsops.c index e80c69d..b57b236 100644 --- a/sys/miscfs/fdesc/fdesc_vfsops.c +++ b/sys/miscfs/fdesc/fdesc_vfsops.c @@ -35,7 +35,7 @@ * * @(#)fdesc_vfsops.c 8.4 (Berkeley) 1/21/94 * - * $Id: fdesc_vfsops.c,v 1.11 1997/08/02 14:31:59 bde Exp $ + * $Id: fdesc_vfsops.c,v 1.12 1997/08/16 19:15:12 wollman Exp $ */ /* @@ -53,6 +53,8 @@ #include #include +static MALLOC_DEFINE(M_FDESCMNT, "FDESC mount", "FDESC mount structure"); + static int fdesc_fhtovp __P((struct mount *mp, struct fid *fhp, struct mbuf *nam, struct vnode **vpp, int *exflagsp, struct ucred **credanonp)); @@ -98,7 +100,7 @@ fdesc_mount(mp, path, data, ndp, p) return (error); MALLOC(fmp, struct fdescmount *, sizeof(struct fdescmount), - M_UFSMNT, M_WAITOK); /* XXX */ + M_FDESCMNT, M_WAITOK); /* XXX */ rvp->v_type = VDIR; rvp->v_flag |= VROOT; fmp->f_root = rvp; @@ -158,7 +160,7 @@ fdesc_unmount(mp, mntflags, p) /* * Finally, throw away the fdescmount structure */ - free(mp->mnt_data, M_UFSMNT); /* XXX */ + free(mp->mnt_data, M_FDESCMNT); /* XXX */ mp->mnt_data = 0; return (0); diff --git a/sys/miscfs/fifofs/fifo_vnops.c b/sys/miscfs/fifofs/fifo_vnops.c index bab3f53..27553a9 100644 --- a/sys/miscfs/fifofs/fifo_vnops.c +++ b/sys/miscfs/fifofs/fifo_vnops.c @@ -31,20 +31,20 @@ * SUCH DAMAGE. * * @(#)fifo_vnops.c 8.10 (Berkeley) 5/27/95 - * $Id: fifo_vnops.c,v 1.26 1997/09/02 20:06:11 bde Exp $ + * $Id: fifo_vnops.c,v 1.27 1997/09/14 02:57:53 peter Exp $ */ #include #include #include #include +#include #include #include #include #include #include #include -#include #include #include #include diff --git a/sys/miscfs/kernfs/kernfs_vfsops.c b/sys/miscfs/kernfs/kernfs_vfsops.c index 57f1538..897e9b0 100644 --- a/sys/miscfs/kernfs/kernfs_vfsops.c +++ b/sys/miscfs/kernfs/kernfs_vfsops.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)kernfs_vfsops.c 8.10 (Berkeley) 5/14/95 - * $Id: kernfs_vfsops.c,v 1.18 1997/02/22 09:40:19 peter Exp $ + * $Id: kernfs_vfsops.c,v 1.19 1997/08/02 14:32:02 bde Exp $ */ /* @@ -52,6 +52,8 @@ #include +static MALLOC_DEFINE(M_KERNFSMNT, "KERNFS mount", "KERNFS mount structure"); + dev_t rrootdev = NODEV; static int cdevvp __P((dev_t dev, struct vnode **vpp)); @@ -128,11 +130,11 @@ kernfs_mount(mp, path, data, ndp, p) return (EOPNOTSUPP); MALLOC(fmp, struct kernfs_mount *, sizeof(struct kernfs_mount), - M_UFSMNT, M_WAITOK); /* XXX */ + M_KERNFSMNT, M_WAITOK); /* XXX */ error = getnewvnode(VT_KERNFS, mp, kernfs_vnodeop_p, &rvp); /* XXX */ if (error) { - FREE(fmp, M_UFSMNT); + FREE(fmp, M_KERNFSMNT); return (error); } @@ -213,7 +215,7 @@ kernfs_unmount(mp, mntflags, p) /* * Finally, throw away the kernfs_mount structure */ - free(mp->mnt_data, M_UFSMNT); /* XXX */ + free(mp->mnt_data, M_KERNFSMNT); /* XXX */ mp->mnt_data = 0; return 0; } diff --git a/sys/miscfs/nullfs/null_vfsops.c b/sys/miscfs/nullfs/null_vfsops.c index ea5711f..29be50a 100644 --- a/sys/miscfs/nullfs/null_vfsops.c +++ b/sys/miscfs/nullfs/null_vfsops.c @@ -36,7 +36,7 @@ * @(#)null_vfsops.c 8.2 (Berkeley) 1/21/94 * * @(#)lofs_vfsops.c 1.2 (Berkeley) 6/18/92 - * $Id: null_vfsops.c,v 1.18 1997/08/02 14:32:05 bde Exp $ + * $Id: null_vfsops.c,v 1.19 1997/08/16 19:15:16 wollman Exp $ */ /* @@ -48,12 +48,14 @@ #include #include #include +#include #include #include #include -#include #include +static MALLOC_DEFINE(M_NULLFSMNT, "NULLFS mount", "NULLFS mount structure"); + static int nullfs_fhtovp __P((struct mount *mp, struct fid *fidp, struct sockaddr *nam, struct vnode **vpp, int *exflagsp, struct ucred **credanonp)); @@ -154,7 +156,7 @@ nullfs_mount(mp, path, data, ndp, p) } xmp = (struct null_mount *) malloc(sizeof(struct null_mount), - M_UFSMNT, M_WAITOK); /* XXX */ + M_NULLFSMNT, M_WAITOK); /* XXX */ /* * Save reference to underlying FS @@ -175,7 +177,7 @@ nullfs_mount(mp, path, data, ndp, p) */ if (error) { vrele(lowerrootvp); - free(xmp, M_UFSMNT); /* XXX */ + free(xmp, M_NULLFSMNT); /* XXX */ return (error); } @@ -268,7 +270,7 @@ nullfs_unmount(mp, mntflags, p) /* * Finally, throw away the null_mount structure */ - free(mp->mnt_data, M_UFSMNT); /* XXX */ + free(mp->mnt_data, M_NULLFSMNT); /* XXX */ mp->mnt_data = 0; return 0; } diff --git a/sys/miscfs/portal/portal_vfsops.c b/sys/miscfs/portal/portal_vfsops.c index c70e73e..15e81b6 100644 --- a/sys/miscfs/portal/portal_vfsops.c +++ b/sys/miscfs/portal/portal_vfsops.c @@ -35,7 +35,7 @@ * * @(#)portal_vfsops.c 8.11 (Berkeley) 5/14/95 * - * $Id: portal_vfsops.c,v 1.16 1997/08/02 14:32:07 bde Exp $ + * $Id: portal_vfsops.c,v 1.17 1997/08/16 19:15:17 wollman Exp $ */ /* @@ -57,6 +57,8 @@ #include #include +static MALLOC_DEFINE(M_PORTALFSMNT, "PORTAL mount", "PORTAL mount structure"); + static int portal_init __P((struct vfsconf *)); static int portal_mount __P((struct mount *mp, char *path, caddr_t data, struct nameidata *ndp, struct proc *p)); @@ -116,11 +118,11 @@ portal_mount(mp, path, data, ndp, p) M_TEMP, M_WAITOK); MALLOC(fmp, struct portalmount *, sizeof(struct portalmount), - M_UFSMNT, M_WAITOK); /* XXX */ + M_PORTALFSMNT, M_WAITOK); /* XXX */ error = getnewvnode(VT_PORTAL, mp, portal_vnodeop_p, &rvp); /* XXX */ if (error) { - FREE(fmp, M_UFSMNT); + FREE(fmp, M_PORTALFSMNT); FREE(pn, M_TEMP); return (error); } @@ -213,7 +215,7 @@ portal_unmount(mp, mntflags, p) /* * Finally, throw away the portalmount structure */ - free(mp->mnt_data, M_UFSMNT); /* XXX */ + free(mp->mnt_data, M_PORTALFSMNT); /* XXX */ mp->mnt_data = 0; return (0); } diff --git a/sys/miscfs/umapfs/umap_vfsops.c b/sys/miscfs/umapfs/umap_vfsops.c index 20c0c4c..0281678 100644 --- a/sys/miscfs/umapfs/umap_vfsops.c +++ b/sys/miscfs/umapfs/umap_vfsops.c @@ -35,7 +35,7 @@ * * @(#)umap_vfsops.c 8.8 (Berkeley) 5/14/95 * - * $Id: umap_vfsops.c,v 1.15 1997/08/02 14:32:25 bde Exp $ + * $Id: umap_vfsops.c,v 1.16 1997/08/16 19:15:21 wollman Exp $ */ /* @@ -53,6 +53,8 @@ #include #include +static MALLOC_DEFINE(M_UMAPFSMNT, "UMAP mount", "UMAP mount structure"); + static int umapfs_fhtovp __P((struct mount *mp, struct fid *fidp, struct sockaddr *nam, struct vnode **vpp, int *exflagsp, struct ucred **credanonp)); @@ -138,7 +140,7 @@ umapfs_mount(mp, path, data, ndp, p) #endif amp = (struct umap_mount *) malloc(sizeof(struct umap_mount), - M_UFSMNT, M_WAITOK); /* XXX */ + M_UMAPFSMNT, M_WAITOK); /* XXX */ /* * Save reference to underlying FS @@ -190,7 +192,7 @@ umapfs_mount(mp, path, data, ndp, p) */ if (error) { vrele(lowerrootvp); - free(amp, M_UFSMNT); /* XXX */ + free(amp, M_UMAPFSMNT); /* XXX */ return (error); } @@ -283,7 +285,7 @@ umapfs_unmount(mp, mntflags, p) /* * Finally, throw away the umap_mount structure */ - free(mp->mnt_data, M_UFSMNT); /* XXX */ + free(mp->mnt_data, M_UMAPFSMNT); /* XXX */ mp->mnt_data = 0; return (0); } diff --git a/sys/miscfs/union/union_vfsops.c b/sys/miscfs/union/union_vfsops.c index 8478a1c..5ace7ce 100644 --- a/sys/miscfs/union/union_vfsops.c +++ b/sys/miscfs/union/union_vfsops.c @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * @(#)union_vfsops.c 8.20 (Berkeley) 5/20/95 - * $Id: union_vfsops.c,v 1.19 1997/08/16 19:15:22 wollman Exp $ + * $Id: union_vfsops.c,v 1.20 1997/09/27 13:39:29 kato Exp $ */ /* @@ -53,6 +53,8 @@ #include #include +static MALLOC_DEFINE(M_UNIONFSMNT, "UNION mount", "UNION mount structure"); + extern int union_init __P((struct vfsconf *)); extern int union_fhtovp __P((struct mount *mp, struct fid *fidp, @@ -176,7 +178,7 @@ union_mount(mp, path, data, ndp, p) } um = (struct union_mount *) malloc(sizeof(struct union_mount), - M_UFSMNT, M_WAITOK); /* XXX */ + M_UNIONFSMNT, M_WAITOK); /* XXX */ /* * Keep a held reference to the target vnodes. @@ -286,7 +288,7 @@ union_mount(mp, path, data, ndp, p) bad: if (um) - free(um, M_UFSMNT); + free(um, M_UNIONFSMNT); if (cred) crfree(cred); if (upperrootvp) @@ -390,7 +392,7 @@ union_unmount(mp, mntflags, p) /* * Finally, throw away the union_mount structure */ - free(mp->mnt_data, M_UFSMNT); /* XXX */ + free(mp->mnt_data, M_UNIONFSMNT); /* XXX */ mp->mnt_data = 0; return (0); } diff --git a/sys/msdosfs/msdosfs_denode.c b/sys/msdosfs/msdosfs_denode.c index 2c3876b..fc2d3db 100644 --- a/sys/msdosfs/msdosfs_denode.c +++ b/sys/msdosfs/msdosfs_denode.c @@ -1,4 +1,4 @@ -/* $Id: msdosfs_denode.c,v 1.26 1997/09/02 20:06:15 bde Exp $ */ +/* $Id: msdosfs_denode.c,v 1.27 1997/10/11 18:31:30 phk Exp $ */ /* $NetBSD: msdosfs_denode.c,v 1.9 1994/08/21 18:44:00 ws Exp $ */ /*- @@ -66,7 +66,7 @@ #include #include -MALLOC_DEFINE(M_MSDOSFSNODE, "MSDOSFS node", "MSDOSFS vnode private part"); +static MALLOC_DEFINE(M_MSDOSFSNODE, "MSDOSFS node", "MSDOSFS vnode private part"); struct denode **dehashtbl; u_long dehash; /* size of hash table - 1 */ diff --git a/sys/msdosfs/msdosfs_vfsops.c b/sys/msdosfs/msdosfs_vfsops.c index c0d287c..9cebfb2 100644 --- a/sys/msdosfs/msdosfs_vfsops.c +++ b/sys/msdosfs/msdosfs_vfsops.c @@ -1,4 +1,4 @@ -/* $Id: msdosfs_vfsops.c,v 1.20 1997/08/16 19:15:24 wollman Exp $ */ +/* $Id: msdosfs_vfsops.c,v 1.21 1997/10/11 18:31:30 phk Exp $ */ /* $NetBSD: msdosfs_vfsops.c,v 1.19 1994/08/21 18:44:10 ws Exp $ */ /*- @@ -67,7 +67,8 @@ #include #include -MALLOC_DEFINE(M_MSDOSFSFAT, "MSDOSFS FAT", "MSDOSFS file allocation table"); +MALLOC_DEFINE(M_MSDOSFSMNT, "MSDOSFS mount", "MSDOSFS mount structure"); +static MALLOC_DEFINE(M_MSDOSFSFAT, "MSDOSFS FAT", "MSDOSFS file allocation table"); static int mountmsdosfs __P((struct vnode *devvp, struct mount *mp, struct proc *p)); diff --git a/sys/msdosfs/msdosfsmount.h b/sys/msdosfs/msdosfsmount.h index 0ab41b4..49a9327 100644 --- a/sys/msdosfs/msdosfsmount.h +++ b/sys/msdosfs/msdosfsmount.h @@ -1,4 +1,4 @@ -/* $Id: msdosfsmount.h,v 1.10 1997/02/22 09:40:49 peter Exp $ */ +/* $Id: msdosfsmount.h,v 1.11 1997/03/03 17:36:11 bde Exp $ */ /* $NetBSD: msdosfsmount.h,v 1.7 1994/08/21 18:44:17 ws Exp $ */ /*- @@ -53,6 +53,10 @@ #ifdef KERNEL +#ifdef MALLOC_DECLARE +MALLOC_DECLARE(M_MSDOSFSMNT); +#endif + /* * Layout of the mount control block for a msdos file system. */ diff --git a/sys/net/hostcache.c b/sys/net/hostcache.c index 761aa1f..78f4408 100644 --- a/sys/net/hostcache.c +++ b/sys/net/hostcache.c @@ -26,7 +26,7 @@ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id$ + * $Id: hostcache.c,v 1.1 1997/06/18 01:24:21 wollman Exp $ */ #include @@ -38,6 +38,8 @@ #include #include +MALLOC_DEFINE(M_HOSTCACHE, "hostcache", "per-host cache structure"); + static struct hctable hctable[AF_MAX]; static int hc_timeout_interval = 120; static int hc_maxidle = 1800; diff --git a/sys/net/hostcache.h b/sys/net/hostcache.h index 47d631f..1e12803 100644 --- a/sys/net/hostcache.h +++ b/sys/net/hostcache.h @@ -26,7 +26,7 @@ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id$ + * $Id: hostcache.h,v 1.1 1997/06/18 01:24:22 wollman Exp $ */ #ifndef _NET_HOSTCACHE_H @@ -76,6 +76,10 @@ struct hctable { }; #ifdef KERNEL + +#ifdef MALLOC_DECLARE +MALLOC_DECLARE(M_HOSTCACHE); +#endif /* * The table-modification functions must be called from user mode, as * they may block waiting for memory and/or locks. diff --git a/sys/net/if.c b/sys/net/if.c index 16a61ea..e68637e 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)if.c 8.3 (Berkeley) 1/4/94 - * $Id: if.c,v 1.53 1997/09/07 11:09:22 joerg Exp $ + * $Id: if.c,v 1.54 1997/10/07 07:40:35 joerg Exp $ */ #include @@ -66,6 +66,8 @@ static void link_rtrequest __P((int, struct rtentry *, struct sockaddr *)); SYSINIT(interfaces, SI_SUB_PROTO_IF, SI_ORDER_FIRST, ifinit, NULL) +MALLOC_DEFINE(M_IFADDR, "ifaddr", "interface address"); +MALLOC_DEFINE(M_IFMADDR, "ether_multi", "link-level multicast address"); int ifqmaxlen = IFQ_MAXLEN; struct ifnethead ifnet; /* depend on static init XXX */ diff --git a/sys/net/if.h b/sys/net/if.h index 2646625..0fe9205 100644 --- a/sys/net/if.h +++ b/sys/net/if.h @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)if.h 8.1 (Berkeley) 6/10/93 - * $Id: if.h,v 1.45 1997/02/22 09:40:58 peter Exp $ + * $Id: if.h,v 1.46 1997/05/03 21:07:12 peter Exp $ */ #ifndef _NET_IF_H_ @@ -199,6 +199,13 @@ struct ifconf { #define ifc_req ifc_ifcu.ifcu_req /* array of structures returned */ }; +#ifdef KERNEL +#ifdef MALLOC_DECLARE +MALLOC_DECLARE(M_IFADDR); +MALLOC_DECLARE(M_IFMADDR); +#endif +#endif + /* XXX - this should go away soon */ #ifdef KERNEL #include diff --git a/sys/net/radix.h b/sys/net/radix.h index dd4e23f..a7287e5 100644 --- a/sys/net/radix.h +++ b/sys/net/radix.h @@ -31,12 +31,16 @@ * SUCH DAMAGE. * * @(#)radix.h 8.2 (Berkeley) 10/31/94 - * $Id: radix.h,v 1.11 1997/02/22 09:41:12 peter Exp $ + * $Id: radix.h,v 1.12 1997/09/07 08:49:04 bde Exp $ */ #ifndef _RADIX_H_ #define _RADIX_H_ +#ifdef MALLOC_DECLARE +MALLOC_DECLARE(M_RTABLE); +#endif + /* * Radix search tree node layout. */ diff --git a/sys/net/rtsock.c b/sys/net/rtsock.c index 9801332..12650ac 100644 --- a/sys/net/rtsock.c +++ b/sys/net/rtsock.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)rtsock.c 8.5 (Berkeley) 11/2/94 - * $Id: rtsock.c,v 1.33 1997/09/02 01:18:49 bde Exp $ + * $Id: rtsock.c,v 1.34 1997/09/14 03:10:38 peter Exp $ */ @@ -52,6 +52,8 @@ #include #include +MALLOC_DEFINE(M_RTABLE, "routetbl", "routing tables"); + static struct sockaddr route_dst = { 2, PF_ROUTE, }; static struct sockaddr route_src = { 2, PF_ROUTE, }; static struct sockaddr sa_zero = { sizeof(sa_zero), AF_INET, }; diff --git a/sys/netinet/igmp.c b/sys/netinet/igmp.c index a370843..8a4bd85 100644 --- a/sys/netinet/igmp.c +++ b/sys/netinet/igmp.c @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * @(#)igmp.c 8.1 (Berkeley) 7/19/93 - * $Id: igmp.c,v 1.23 1997/09/16 11:43:50 bde Exp $ + * $Id: igmp.c,v 1.24 1997/10/11 18:31:31 phk Exp $ */ /* @@ -69,7 +69,7 @@ #include #include -MALLOC_DEFINE(M_MRTABLE, "mrt", "multicast routing tables"); +static MALLOC_DEFINE(M_MRTABLE, "mrt", "multicast routing tables"); static struct router_info * find_rti __P((struct ifnet *ifp)); diff --git a/sys/netinet/in.c b/sys/netinet/in.c index f06361a..da4a1e6 100644 --- a/sys/netinet/in.c +++ b/sys/netinet/in.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)in.c 8.4 (Berkeley) 1/9/95 - * $Id: in.c,v 1.35 1997/08/02 14:32:49 bde Exp $ + * $Id: in.c,v 1.36 1997/10/11 18:31:31 phk Exp $ */ #include @@ -51,7 +51,7 @@ #include -MALLOC_DEFINE(M_IPMADDR, "in_multi", "internet multicast address"); +static MALLOC_DEFINE(M_IPMADDR, "in_multi", "internet multicast address"); static void in_socktrim __P((struct sockaddr_in *)); static int in_ifinit __P((struct ifnet *, diff --git a/sys/netinet/ip_fw.c b/sys/netinet/ip_fw.c index 6f76bde..2151820 100644 --- a/sys/netinet/ip_fw.c +++ b/sys/netinet/ip_fw.c @@ -12,7 +12,7 @@ * * This software is provided ``AS IS'' without any warranties of any kind. * - * $Id: ip_fw.c,v 1.62 1997/08/23 14:28:22 alex Exp $ + * $Id: ip_fw.c,v 1.63 1997/09/10 03:07:14 peter Exp $ */ /* @@ -57,6 +57,8 @@ static int fw_verbose_limit = 0; LIST_HEAD (ip_fw_head, ip_fw_chain) ip_fw_chain; +static MALLOC_DEFINE(M_IPFW, "IpFw/IpAcct", "IpFw/IpAcct chain's"); + #ifdef SYSCTL_NODE SYSCTL_NODE(_net_inet_ip, OID_AUTO, fw, CTLFLAG_RW, 0, "Firewall"); SYSCTL_INT(_net_inet_ip_fw, OID_AUTO, debug, CTLFLAG_RW, &fw_debug, 0, ""); diff --git a/sys/netinet/ip_output.c b/sys/netinet/ip_output.c index 59276455..ef996c2 100644 --- a/sys/netinet/ip_output.c +++ b/sys/netinet/ip_output.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)ip_output.c 8.3 (Berkeley) 1/21/94 - * $Id: ip_output.c,v 1.58 1997/08/02 14:32:53 bde Exp $ + * $Id: ip_output.c,v 1.59 1997/10/11 18:31:32 phk Exp $ */ #define _IP_VHL @@ -59,7 +59,7 @@ #endif #include -MALLOC_DEFINE(M_IPMOPTS, "ip_moptions", "internet multicast options"); +static MALLOC_DEFINE(M_IPMOPTS, "ip_moptions", "internet multicast options"); #if !defined(COMPAT_IPFW) || COMPAT_IPFW == 1 #undef COMPAT_IPFW diff --git a/sys/netkey/key.c b/sys/netkey/key.c index 16d8cfd..b54a573 100644 --- a/sys/netkey/key.c +++ b/sys/netkey/key.c @@ -101,7 +101,7 @@ Research Laboratory (NRL). #include #include -MALLOC_DEFINE(M_SECA, "key mgmt", "security associations, key management"); +static MALLOC_DEFINE(M_SECA, "key mgmt", "security associations, key management"); #define SOCKADDR struct sockaddr diff --git a/sys/netnatm/natm_pcb.c b/sys/netnatm/natm_pcb.c index 6184f87..1b0067a 100644 --- a/sys/netnatm/natm_pcb.c +++ b/sys/netnatm/natm_pcb.c @@ -39,8 +39,8 @@ #include #include -#include #include +#include #include diff --git a/sys/nfs/krpc_subr.c b/sys/nfs/krpc_subr.c index 5423686..6801b93 100644 --- a/sys/nfs/krpc_subr.c +++ b/sys/nfs/krpc_subr.c @@ -1,5 +1,5 @@ /* $NetBSD: krpc_subr.c,v 1.12.4.1 1996/06/07 00:52:26 cgd Exp $ */ -/* $Id: krpc_subr.c,v 1.4 1997/08/16 19:15:53 wollman Exp $ */ +/* $Id: krpc_subr.c,v 1.5 1997/09/02 01:19:26 bde Exp $ */ /* * Copyright (c) 1995 Gordon Ross, Adam Glass @@ -48,8 +48,8 @@ #include #include #include -#include #include +#include #include #include #include diff --git a/sys/nfs/nfs.h b/sys/nfs/nfs.h index 8fa52f3..cd1db27 100644 --- a/sys/nfs/nfs.h +++ b/sys/nfs/nfs.h @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)nfs.h 8.4 (Berkeley) 5/1/95 - * $Id: nfs.h,v 1.30 1997/08/16 19:15:54 wollman Exp $ + * $Id: nfs.h,v 1.31 1997/09/10 19:52:24 phk Exp $ */ #ifndef _NFS_NFS_H_ @@ -300,6 +300,17 @@ struct nfsstats { */ #ifdef KERNEL +#ifdef MALLOC_DECLARE +MALLOC_DECLARE(M_NFSREQ); +MALLOC_DECLARE(M_NFSMNT); +MALLOC_DECLARE(M_NFSDIROFF); +MALLOC_DECLARE(M_NFSRVDESC); +MALLOC_DECLARE(M_NFSUID); +MALLOC_DECLARE(M_NQLEASE); +MALLOC_DECLARE(M_NFSD); +MALLOC_DECLARE(M_NFSBIGFH); +#endif + struct uio; struct buf; struct vattr; struct nameidata; /* XXX */ #define NFSINT_SIGMASK (sigmask(SIGINT)|sigmask(SIGTERM)|sigmask(SIGKILL)| \ diff --git a/sys/nfs/nfs_node.c b/sys/nfs/nfs_node.c index ee186ea..97d58ee 100644 --- a/sys/nfs/nfs_node.c +++ b/sys/nfs/nfs_node.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)nfs_node.c 8.6 (Berkeley) 5/22/95 - * $Id: nfs_node.c,v 1.19 1997/09/21 04:23:45 dyson Exp $ + * $Id: nfs_node.c,v 1.20 1997/10/11 18:31:34 phk Exp $ */ @@ -51,7 +51,7 @@ #include #include -MALLOC_DEFINE(M_NFSNODE, "NFS node", "NFS vnode private part"); +static MALLOC_DEFINE(M_NFSNODE, "NFS node", "NFS vnode private part"); LIST_HEAD(nfsnodehashhead, nfsnode) *nfsnodehashtbl; u_long nfsnodehash; diff --git a/sys/nfs/nfs_nqlease.c b/sys/nfs/nfs_nqlease.c index 7ceb9a2..98b2db0 100644 --- a/sys/nfs/nfs_nqlease.c +++ b/sys/nfs/nfs_nqlease.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)nfs_nqlease.c 8.9 (Berkeley) 5/20/95 - * $Id: nfs_nqlease.c,v 1.28 1997/09/02 01:19:30 bde Exp $ + * $Id: nfs_nqlease.c,v 1.29 1997/10/11 18:31:34 phk Exp $ */ @@ -53,11 +53,11 @@ */ #include #include +#include #include #include #include #include -#include #include #include #include @@ -76,7 +76,7 @@ #include #include -MALLOC_DEFINE(M_NQMHOST, "NQNFS Host", "Nqnfs host address table"); +static MALLOC_DEFINE(M_NQMHOST, "NQNFS Host", "Nqnfs host address table"); time_t nqnfsstarttime = (time_t)0; int nqsrv_clockskew = NQ_CLOCKSKEW; diff --git a/sys/nfs/nfs_socket.c b/sys/nfs/nfs_socket.c index 82999f2..55ee3ed 100644 --- a/sys/nfs/nfs_socket.c +++ b/sys/nfs/nfs_socket.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)nfs_socket.c 8.5 (Berkeley) 3/30/95 - * $Id: nfs_socket.c,v 1.27 1997/08/16 19:15:57 wollman Exp $ + * $Id: nfs_socket.c,v 1.28 1997/09/02 01:19:37 bde Exp $ */ /* @@ -44,9 +44,9 @@ #include #include #include +#include #include #include -#include #include #include #include diff --git a/sys/nfs/nfs_srvcache.c b/sys/nfs/nfs_srvcache.c index 6c6be6d..14eaedd 100644 --- a/sys/nfs/nfs_srvcache.c +++ b/sys/nfs/nfs_srvcache.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)nfs_srvcache.c 8.3 (Berkeley) 3/30/95 - * $Id: nfs_srvcache.c,v 1.13 1997/08/02 14:33:07 bde Exp $ + * $Id: nfs_srvcache.c,v 1.14 1997/08/16 19:15:58 wollman Exp $ */ #ifndef NFS_NOSERVER @@ -44,10 +44,10 @@ * pages 53-63. San Diego, February 1989. */ #include +#include #include #include #include -#include #include #include /* for dup_sockaddr */ diff --git a/sys/nfs/nfs_syscalls.c b/sys/nfs/nfs_syscalls.c index 8e3955e..fcf1745 100644 --- a/sys/nfs/nfs_syscalls.c +++ b/sys/nfs/nfs_syscalls.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)nfs_syscalls.c 8.5 (Berkeley) 3/30/95 - * $Id: nfs_syscalls.c,v 1.27 1997/08/16 19:16:00 wollman Exp $ + * $Id: nfs_syscalls.c,v 1.28 1997/10/11 18:31:35 phk Exp $ */ #include @@ -46,10 +46,10 @@ #include #include #include +#include #include #include #include -#include #include #include #include @@ -75,7 +75,7 @@ #include #include -MALLOC_DEFINE(M_NFSSVC, "NFS srvsock", "Nfs server structure"); +static MALLOC_DEFINE(M_NFSSVC, "NFS srvsock", "Nfs server structure"); /* Global defs. */ extern int (*nfsrv3_procs[NFS_NPROCS]) __P((struct nfsrv_descript *nd, diff --git a/sys/nfs/nfs_vfsops.c b/sys/nfs/nfs_vfsops.c index 45d7edb..011b4ab 100644 --- a/sys/nfs/nfs_vfsops.c +++ b/sys/nfs/nfs_vfsops.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)nfs_vfsops.c 8.12 (Berkeley) 5/20/95 - * $Id: nfs_vfsops.c,v 1.47 1997/09/07 12:56:44 bde Exp $ + * $Id: nfs_vfsops.c,v 1.48 1997/09/10 19:52:26 phk Exp $ */ #include @@ -46,9 +46,9 @@ #include #include #include +#include #include #include -#include #include #include #include @@ -76,6 +76,15 @@ extern int nfs_mountroot __P((struct mount *mp)); extern int nfs_ticks; +MALLOC_DEFINE(M_NFSREQ, "NFS req", "NFS request header"); +MALLOC_DEFINE(M_NFSMNT, "NFS mount", "NFS mount structure"); +MALLOC_DEFINE(M_NFSBIGFH, "NFSV3 bigfh", "NFS version 3 file handle"); +MALLOC_DEFINE(M_NFSD, "NFS daemon", "Nfs server daemon structure"); +MALLOC_DEFINE(M_NFSDIROFF, "NFSV3 diroff", "NFS directory offset data"); +MALLOC_DEFINE(M_NFSRVDESC, "NFSV3 srvdesc", "NFS server socket descriptor"); +MALLOC_DEFINE(M_NFSUID, "NFS uid", "Nfs uid mapping structure"); +MALLOC_DEFINE(M_NQLEASE, "NQNFS Lease", "Nqnfs lease"); + struct nfsstats nfsstats; SYSCTL_NODE(_vfs, MOUNT_NFS, nfs, CTLFLAG_RW, 0, "NFS filesystem"); SYSCTL_STRUCT(_vfs_nfs, NFS_NFSSTATS, nfsstats, CTLFLAG_RD, diff --git a/sys/nfsclient/krpc_subr.c b/sys/nfsclient/krpc_subr.c index 5423686..6801b93 100644 --- a/sys/nfsclient/krpc_subr.c +++ b/sys/nfsclient/krpc_subr.c @@ -1,5 +1,5 @@ /* $NetBSD: krpc_subr.c,v 1.12.4.1 1996/06/07 00:52:26 cgd Exp $ */ -/* $Id: krpc_subr.c,v 1.4 1997/08/16 19:15:53 wollman Exp $ */ +/* $Id: krpc_subr.c,v 1.5 1997/09/02 01:19:26 bde Exp $ */ /* * Copyright (c) 1995 Gordon Ross, Adam Glass @@ -48,8 +48,8 @@ #include #include #include -#include #include +#include #include #include #include diff --git a/sys/nfsclient/nfs.h b/sys/nfsclient/nfs.h index 8fa52f3..cd1db27 100644 --- a/sys/nfsclient/nfs.h +++ b/sys/nfsclient/nfs.h @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)nfs.h 8.4 (Berkeley) 5/1/95 - * $Id: nfs.h,v 1.30 1997/08/16 19:15:54 wollman Exp $ + * $Id: nfs.h,v 1.31 1997/09/10 19:52:24 phk Exp $ */ #ifndef _NFS_NFS_H_ @@ -300,6 +300,17 @@ struct nfsstats { */ #ifdef KERNEL +#ifdef MALLOC_DECLARE +MALLOC_DECLARE(M_NFSREQ); +MALLOC_DECLARE(M_NFSMNT); +MALLOC_DECLARE(M_NFSDIROFF); +MALLOC_DECLARE(M_NFSRVDESC); +MALLOC_DECLARE(M_NFSUID); +MALLOC_DECLARE(M_NQLEASE); +MALLOC_DECLARE(M_NFSD); +MALLOC_DECLARE(M_NFSBIGFH); +#endif + struct uio; struct buf; struct vattr; struct nameidata; /* XXX */ #define NFSINT_SIGMASK (sigmask(SIGINT)|sigmask(SIGTERM)|sigmask(SIGKILL)| \ diff --git a/sys/nfsclient/nfs_nfsiod.c b/sys/nfsclient/nfs_nfsiod.c index 8e3955e..fcf1745 100644 --- a/sys/nfsclient/nfs_nfsiod.c +++ b/sys/nfsclient/nfs_nfsiod.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)nfs_syscalls.c 8.5 (Berkeley) 3/30/95 - * $Id: nfs_syscalls.c,v 1.27 1997/08/16 19:16:00 wollman Exp $ + * $Id: nfs_syscalls.c,v 1.28 1997/10/11 18:31:35 phk Exp $ */ #include @@ -46,10 +46,10 @@ #include #include #include +#include #include #include #include -#include #include #include #include @@ -75,7 +75,7 @@ #include #include -MALLOC_DEFINE(M_NFSSVC, "NFS srvsock", "Nfs server structure"); +static MALLOC_DEFINE(M_NFSSVC, "NFS srvsock", "Nfs server structure"); /* Global defs. */ extern int (*nfsrv3_procs[NFS_NPROCS]) __P((struct nfsrv_descript *nd, diff --git a/sys/nfsclient/nfs_node.c b/sys/nfsclient/nfs_node.c index ee186ea..97d58ee 100644 --- a/sys/nfsclient/nfs_node.c +++ b/sys/nfsclient/nfs_node.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)nfs_node.c 8.6 (Berkeley) 5/22/95 - * $Id: nfs_node.c,v 1.19 1997/09/21 04:23:45 dyson Exp $ + * $Id: nfs_node.c,v 1.20 1997/10/11 18:31:34 phk Exp $ */ @@ -51,7 +51,7 @@ #include #include -MALLOC_DEFINE(M_NFSNODE, "NFS node", "NFS vnode private part"); +static MALLOC_DEFINE(M_NFSNODE, "NFS node", "NFS vnode private part"); LIST_HEAD(nfsnodehashhead, nfsnode) *nfsnodehashtbl; u_long nfsnodehash; diff --git a/sys/nfsclient/nfs_socket.c b/sys/nfsclient/nfs_socket.c index 82999f2..55ee3ed 100644 --- a/sys/nfsclient/nfs_socket.c +++ b/sys/nfsclient/nfs_socket.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)nfs_socket.c 8.5 (Berkeley) 3/30/95 - * $Id: nfs_socket.c,v 1.27 1997/08/16 19:15:57 wollman Exp $ + * $Id: nfs_socket.c,v 1.28 1997/09/02 01:19:37 bde Exp $ */ /* @@ -44,9 +44,9 @@ #include #include #include +#include #include #include -#include #include #include #include diff --git a/sys/nfsclient/nfs_vfsops.c b/sys/nfsclient/nfs_vfsops.c index 45d7edb..011b4ab 100644 --- a/sys/nfsclient/nfs_vfsops.c +++ b/sys/nfsclient/nfs_vfsops.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)nfs_vfsops.c 8.12 (Berkeley) 5/20/95 - * $Id: nfs_vfsops.c,v 1.47 1997/09/07 12:56:44 bde Exp $ + * $Id: nfs_vfsops.c,v 1.48 1997/09/10 19:52:26 phk Exp $ */ #include @@ -46,9 +46,9 @@ #include #include #include +#include #include #include -#include #include #include #include @@ -76,6 +76,15 @@ extern int nfs_mountroot __P((struct mount *mp)); extern int nfs_ticks; +MALLOC_DEFINE(M_NFSREQ, "NFS req", "NFS request header"); +MALLOC_DEFINE(M_NFSMNT, "NFS mount", "NFS mount structure"); +MALLOC_DEFINE(M_NFSBIGFH, "NFSV3 bigfh", "NFS version 3 file handle"); +MALLOC_DEFINE(M_NFSD, "NFS daemon", "Nfs server daemon structure"); +MALLOC_DEFINE(M_NFSDIROFF, "NFSV3 diroff", "NFS directory offset data"); +MALLOC_DEFINE(M_NFSRVDESC, "NFSV3 srvdesc", "NFS server socket descriptor"); +MALLOC_DEFINE(M_NFSUID, "NFS uid", "Nfs uid mapping structure"); +MALLOC_DEFINE(M_NQLEASE, "NQNFS Lease", "Nqnfs lease"); + struct nfsstats nfsstats; SYSCTL_NODE(_vfs, MOUNT_NFS, nfs, CTLFLAG_RW, 0, "NFS filesystem"); SYSCTL_STRUCT(_vfs_nfs, NFS_NFSSTATS, nfsstats, CTLFLAG_RD, diff --git a/sys/nfsclient/nfsargs.h b/sys/nfsclient/nfsargs.h index 8fa52f3..cd1db27 100644 --- a/sys/nfsclient/nfsargs.h +++ b/sys/nfsclient/nfsargs.h @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)nfs.h 8.4 (Berkeley) 5/1/95 - * $Id: nfs.h,v 1.30 1997/08/16 19:15:54 wollman Exp $ + * $Id: nfs.h,v 1.31 1997/09/10 19:52:24 phk Exp $ */ #ifndef _NFS_NFS_H_ @@ -300,6 +300,17 @@ struct nfsstats { */ #ifdef KERNEL +#ifdef MALLOC_DECLARE +MALLOC_DECLARE(M_NFSREQ); +MALLOC_DECLARE(M_NFSMNT); +MALLOC_DECLARE(M_NFSDIROFF); +MALLOC_DECLARE(M_NFSRVDESC); +MALLOC_DECLARE(M_NFSUID); +MALLOC_DECLARE(M_NQLEASE); +MALLOC_DECLARE(M_NFSD); +MALLOC_DECLARE(M_NFSBIGFH); +#endif + struct uio; struct buf; struct vattr; struct nameidata; /* XXX */ #define NFSINT_SIGMASK (sigmask(SIGINT)|sigmask(SIGTERM)|sigmask(SIGKILL)| \ diff --git a/sys/nfsclient/nfsstats.h b/sys/nfsclient/nfsstats.h index 8fa52f3..cd1db27 100644 --- a/sys/nfsclient/nfsstats.h +++ b/sys/nfsclient/nfsstats.h @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)nfs.h 8.4 (Berkeley) 5/1/95 - * $Id: nfs.h,v 1.30 1997/08/16 19:15:54 wollman Exp $ + * $Id: nfs.h,v 1.31 1997/09/10 19:52:24 phk Exp $ */ #ifndef _NFS_NFS_H_ @@ -300,6 +300,17 @@ struct nfsstats { */ #ifdef KERNEL +#ifdef MALLOC_DECLARE +MALLOC_DECLARE(M_NFSREQ); +MALLOC_DECLARE(M_NFSMNT); +MALLOC_DECLARE(M_NFSDIROFF); +MALLOC_DECLARE(M_NFSRVDESC); +MALLOC_DECLARE(M_NFSUID); +MALLOC_DECLARE(M_NQLEASE); +MALLOC_DECLARE(M_NFSD); +MALLOC_DECLARE(M_NFSBIGFH); +#endif + struct uio; struct buf; struct vattr; struct nameidata; /* XXX */ #define NFSINT_SIGMASK (sigmask(SIGINT)|sigmask(SIGTERM)|sigmask(SIGKILL)| \ diff --git a/sys/nfsserver/nfs.h b/sys/nfsserver/nfs.h index 8fa52f3..cd1db27 100644 --- a/sys/nfsserver/nfs.h +++ b/sys/nfsserver/nfs.h @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)nfs.h 8.4 (Berkeley) 5/1/95 - * $Id: nfs.h,v 1.30 1997/08/16 19:15:54 wollman Exp $ + * $Id: nfs.h,v 1.31 1997/09/10 19:52:24 phk Exp $ */ #ifndef _NFS_NFS_H_ @@ -300,6 +300,17 @@ struct nfsstats { */ #ifdef KERNEL +#ifdef MALLOC_DECLARE +MALLOC_DECLARE(M_NFSREQ); +MALLOC_DECLARE(M_NFSMNT); +MALLOC_DECLARE(M_NFSDIROFF); +MALLOC_DECLARE(M_NFSRVDESC); +MALLOC_DECLARE(M_NFSUID); +MALLOC_DECLARE(M_NQLEASE); +MALLOC_DECLARE(M_NFSD); +MALLOC_DECLARE(M_NFSBIGFH); +#endif + struct uio; struct buf; struct vattr; struct nameidata; /* XXX */ #define NFSINT_SIGMASK (sigmask(SIGINT)|sigmask(SIGTERM)|sigmask(SIGKILL)| \ diff --git a/sys/nfsserver/nfs_srvcache.c b/sys/nfsserver/nfs_srvcache.c index 6c6be6d..14eaedd 100644 --- a/sys/nfsserver/nfs_srvcache.c +++ b/sys/nfsserver/nfs_srvcache.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)nfs_srvcache.c 8.3 (Berkeley) 3/30/95 - * $Id: nfs_srvcache.c,v 1.13 1997/08/02 14:33:07 bde Exp $ + * $Id: nfs_srvcache.c,v 1.14 1997/08/16 19:15:58 wollman Exp $ */ #ifndef NFS_NOSERVER @@ -44,10 +44,10 @@ * pages 53-63. San Diego, February 1989. */ #include +#include #include #include #include -#include #include #include /* for dup_sockaddr */ diff --git a/sys/nfsserver/nfs_srvsock.c b/sys/nfsserver/nfs_srvsock.c index 82999f2..55ee3ed 100644 --- a/sys/nfsserver/nfs_srvsock.c +++ b/sys/nfsserver/nfs_srvsock.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)nfs_socket.c 8.5 (Berkeley) 3/30/95 - * $Id: nfs_socket.c,v 1.27 1997/08/16 19:15:57 wollman Exp $ + * $Id: nfs_socket.c,v 1.28 1997/09/02 01:19:37 bde Exp $ */ /* @@ -44,9 +44,9 @@ #include #include #include +#include #include #include -#include #include #include #include diff --git a/sys/nfsserver/nfs_syscalls.c b/sys/nfsserver/nfs_syscalls.c index 8e3955e..fcf1745 100644 --- a/sys/nfsserver/nfs_syscalls.c +++ b/sys/nfsserver/nfs_syscalls.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)nfs_syscalls.c 8.5 (Berkeley) 3/30/95 - * $Id: nfs_syscalls.c,v 1.27 1997/08/16 19:16:00 wollman Exp $ + * $Id: nfs_syscalls.c,v 1.28 1997/10/11 18:31:35 phk Exp $ */ #include @@ -46,10 +46,10 @@ #include #include #include +#include #include #include #include -#include #include #include #include @@ -75,7 +75,7 @@ #include #include -MALLOC_DEFINE(M_NFSSVC, "NFS srvsock", "Nfs server structure"); +static MALLOC_DEFINE(M_NFSSVC, "NFS srvsock", "Nfs server structure"); /* Global defs. */ extern int (*nfsrv3_procs[NFS_NPROCS]) __P((struct nfsrv_descript *nd, diff --git a/sys/nfsserver/nfsrvstats.h b/sys/nfsserver/nfsrvstats.h index 8fa52f3..cd1db27 100644 --- a/sys/nfsserver/nfsrvstats.h +++ b/sys/nfsserver/nfsrvstats.h @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)nfs.h 8.4 (Berkeley) 5/1/95 - * $Id: nfs.h,v 1.30 1997/08/16 19:15:54 wollman Exp $ + * $Id: nfs.h,v 1.31 1997/09/10 19:52:24 phk Exp $ */ #ifndef _NFS_NFS_H_ @@ -300,6 +300,17 @@ struct nfsstats { */ #ifdef KERNEL +#ifdef MALLOC_DECLARE +MALLOC_DECLARE(M_NFSREQ); +MALLOC_DECLARE(M_NFSMNT); +MALLOC_DECLARE(M_NFSDIROFF); +MALLOC_DECLARE(M_NFSRVDESC); +MALLOC_DECLARE(M_NFSUID); +MALLOC_DECLARE(M_NQLEASE); +MALLOC_DECLARE(M_NFSD); +MALLOC_DECLARE(M_NFSBIGFH); +#endif + struct uio; struct buf; struct vattr; struct nameidata; /* XXX */ #define NFSINT_SIGMASK (sigmask(SIGINT)|sigmask(SIGTERM)|sigmask(SIGKILL)| \ diff --git a/sys/sys/filedesc.h b/sys/sys/filedesc.h index dc58caa..cc97195 100644 --- a/sys/sys/filedesc.h +++ b/sys/sys/filedesc.h @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)filedesc.h 8.1 (Berkeley) 6/2/93 - * $Id$ + * $Id: filedesc.h,v 1.11 1997/02/22 09:45:14 peter Exp $ */ #ifndef _SYS_FILEDESC_H_ @@ -92,6 +92,9 @@ struct filedesc0 { #define OFILESIZE (sizeof(struct file *) + sizeof(char)) #ifdef KERNEL +#ifdef MALLOC_DECLARE +MALLOC_DECLARE(M_IOV); +#endif /* * Kernel global variables and routines. */ diff --git a/sys/sys/malloc.h b/sys/sys/malloc.h index ca4dd13..92fd095 100644 --- a/sys/sys/malloc.h +++ b/sys/sys/malloc.h @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)malloc.h 8.5 (Berkeley) 5/3/95 - * $Id: malloc.h,v 1.28 1997/10/11 13:10:17 phk Exp $ + * $Id: malloc.h,v 1.29 1997/10/11 18:31:36 phk Exp $ */ #ifndef _SYS_MALLOC_H_ @@ -47,8 +47,8 @@ #define M_KERNEL 0x0002 struct malloc_type { - const char *ks_shortdesc; /* Short description */ - const char *ks_longdesc; /* Long description */ + const char * const ks_shortdesc; /* Short description */ + const char * const ks_longdesc; /* Long description */ struct malloc_type *ks_next; /* Next pointer */ long ks_inuse; /* # of packets of this type currently in use */ long ks_calls; /* total packets of this type ever allocated */ @@ -69,52 +69,16 @@ struct malloc_type { struct __hack #ifdef MALLOC_INSTANTIATE -#define MALLOC_MAKE_TYPE(type, short, long) \ - MALLOC_DEFINE(type, short, long); +#define MALLOC_MAKE_TYPE(type, shortdesc, longdesc) \ + MALLOC_DEFINE(type, shortdesc, longdesc); #else -#define MALLOC_MAKE_TYPE(type, short, long) \ +#define MALLOC_MAKE_TYPE(type, shortdesc, longdesc) \ MALLOC_DECLARE(type); #endif -MALLOC_MAKE_TYPE(M_FREE, "free", "should be on free list"); -MALLOC_MAKE_TYPE(M_MBUF, "mbuf", "mbuf"); -MALLOC_MAKE_TYPE(M_DEVBUF, "devbuf", "device driver memory"); -MALLOC_MAKE_TYPE(M_PCB, "pcb", "protocol control block"); -MALLOC_MAKE_TYPE(M_RTABLE, "routetbl", "routing tables"); -MALLOC_MAKE_TYPE(M_FTABLE, "fragtbl", "fragment reassembly header"); -MALLOC_MAKE_TYPE(M_IFADDR, "ifaddr", "interface address"); -MALLOC_MAKE_TYPE(M_SOCKET, "socket", "socket structure"); -MALLOC_MAKE_TYPE(M_SOOPTS, "soopts", "socket options"); -MALLOC_MAKE_TYPE(M_SONAME, "soname", "socket name"); -MALLOC_MAKE_TYPE(M_CRED, "cred", "credentials"); -MALLOC_MAKE_TYPE(M_SESSION, "session", "session header"); -MALLOC_MAKE_TYPE(M_IOV, "iov", "large iov's"); -MALLOC_MAKE_TYPE(M_MOUNT, "mount", "vfs mount struct"); -MALLOC_MAKE_TYPE(M_NFSREQ, "NFS req", "NFS request header"); -MALLOC_MAKE_TYPE(M_NFSMNT, "NFS mount", "NFS mount structure"); -MALLOC_MAKE_TYPE(M_VNODE, "vnodes", "Dynamically allocated vnodes"); MALLOC_MAKE_TYPE(M_CACHE, "namecache", "Dynamically allocated cache entries"); -MALLOC_MAKE_TYPE(M_UFSMNT, "UFS mount", "UFS mount structure"); -MALLOC_MAKE_TYPE(M_VMPGDATA, "VM pgdata", "XXX: VM pager private data"); -MALLOC_MAKE_TYPE(M_FILE, "file", "Open file structure"); -MALLOC_MAKE_TYPE(M_PROC, "proc", "Proc structures"); -MALLOC_MAKE_TYPE(M_SUBPROC, "subproc", "Proc sub-structures"); -MALLOC_MAKE_TYPE(M_SEGMENT, "LFS segment", "Segment for LFS"); -MALLOC_MAKE_TYPE(M_LFSNODE, "LFS node", "LFS vnode private part"); -MALLOC_MAKE_TYPE(M_NQLEASE, "NQNFS Lease", "Nqnfs lease"); -MALLOC_MAKE_TYPE(M_NFSUID, "NFS uid", "Nfs uid mapping structure"); -MALLOC_MAKE_TYPE(M_NFSD, "NFS daemon", "Nfs server daemon structure"); -MALLOC_MAKE_TYPE(M_IFMADDR, "ether_multi", "link-level multicast address"); -MALLOC_MAKE_TYPE(M_ISOFSMNT, "ISOFS mount", "ISOFS mount structure"); -MALLOC_MAKE_TYPE(M_ISOFSNODE, "ISOFS node", "ISOFS vnode private part"); -MALLOC_MAKE_TYPE(M_NFSRVDESC, "NFSV3 srvdesc", "NFS server socket descriptor"); -MALLOC_MAKE_TYPE(M_NFSDIROFF, "NFSV3 diroff", "NFS directory offset data"); -MALLOC_MAKE_TYPE(M_NFSBIGFH, "NFSV3 bigfh", "NFS version 3 file handle"); -MALLOC_MAKE_TYPE(M_MSDOSFSMNT, "MSDOSFS mount", "MSDOSFS mount structure"); +MALLOC_MAKE_TYPE(M_DEVBUF, "devbuf", "device driver memory"); MALLOC_MAKE_TYPE(M_TEMP, "temp", "misc temporary data buffers"); -MALLOC_MAKE_TYPE(M_TTYS, "ttys", "tty data structures"); -MALLOC_MAKE_TYPE(M_IPFW, "IpFw/IpAcct", "IpFw/IpAcct chain's"); -MALLOC_MAKE_TYPE(M_HOSTCACHE, "hostcache", "per-host information cache structure"); /* * Array of descriptors that describe the contents of each page diff --git a/sys/sys/mbuf.h b/sys/sys/mbuf.h index 92bae3c..2af8d54 100644 --- a/sys/sys/mbuf.h +++ b/sys/sys/mbuf.h @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)mbuf.h 8.5 (Berkeley) 2/19/95 - * $Id: mbuf.h,v 1.23 1997/10/10 14:05:38 phk Exp $ + * $Id: mbuf.h,v 1.24 1997/10/10 18:15:46 phk Exp $ */ #ifndef _SYS_MBUF_H_ @@ -395,7 +395,6 @@ extern int max_linkhdr; /* largest link-level header */ extern int max_protohdr; /* largest protocol header */ extern int max_hdr; /* largest link+protocol header */ extern int max_datalen; /* MHLEN - max_hdr */ -extern struct malloc_type *mbtypes[]; /* XXX */ struct mbuf *m_copym __P((struct mbuf *, int, int, int)); struct mbuf *m_copypacket __P((struct mbuf *, int)); @@ -418,26 +417,6 @@ void m_copyback __P((struct mbuf *, int, int, caddr_t)); void m_copydata __P((struct mbuf *,int,int,caddr_t)); void m_freem __P((struct mbuf *)); -#ifdef MBTYPES -struct malloc_type *mbtypes[] = { /* XXX */ - M_FREE, /* MT_FREE 0 should be on free list */ - M_MBUF, /* MT_DATA 1 dynamic (data) allocation */ - M_MBUF, /* MT_HEADER 2 packet header */ - 0, /* 3 */ - 0, /* 4 */ - M_RTABLE, /* MT_RTABLE 5 routing tables */ - 0, /* 6 */ - 0, /* 7 */ - M_MBUF, /* MT_SONAME 8 socket name */ - 0, /* 9 */ - M_SOOPTS, /* MT_SOOPTS 10 socket options */ - M_FTABLE, /* MT_FTABLE 11 fragment reassembly header */ - 0, /* 12 */ - 0, /* 13 */ - M_MBUF, /* MT_CONTROL 14 extra-data protocol message */ - M_MBUF, /* MT_OOBDATA 15 expedited data */ -}; -#endif -#endif +#endif /* KERNEL */ #endif /* !_SYS_MBUF_H_ */ diff --git a/sys/sys/mount.h b/sys/sys/mount.h index b194be0..8c3d1bf 100644 --- a/sys/sys/mount.h +++ b/sys/sys/mount.h @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)mount.h 8.21 (Berkeley) 5/20/95 - * $Id: mount.h,v 1.46 1997/09/16 14:44:24 bde Exp $ + * $Id: mount.h,v 1.47 1997/09/27 13:39:49 kato Exp $ */ #ifndef _SYS_MOUNT_H_ @@ -309,6 +309,9 @@ struct ovfsconf { #ifdef KERNEL +#ifdef MALLOC_DECLARE +MALLOC_DECLARE(M_MOUNT); +#endif extern int maxvfsconf; /* highest defined filesystem type */ extern struct vfsconf *vfsconf; /* head of list of filesystem types */ diff --git a/sys/sys/proc.h b/sys/sys/proc.h index 78bf64e..a8adcfc 100644 --- a/sys/sys/proc.h +++ b/sys/sys/proc.h @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)proc.h 8.15 (Berkeley) 5/19/95 - * $Id: proc.h,v 1.43 1997/09/13 19:42:27 joerg Exp $ + * $Id: proc.h,v 1.44 1997/09/21 22:09:18 gibbs Exp $ */ #ifndef _SYS_PROC_H_ @@ -249,6 +249,13 @@ struct pcred { }; #ifdef KERNEL + +#ifdef MALLOC_DECLARE +MALLOC_DECLARE(M_SESSION); +MALLOC_DECLARE(M_PROC); +MALLOC_DECLARE(M_SUBPROC); +#endif + /* * We use process IDs <= PID_MAX; PID_MAX + 1 must also fit in a pid_t, * as it is used to represent "no process group". diff --git a/sys/sys/socket.h b/sys/sys/socket.h index 2d01143..366d0f6 100644 --- a/sys/sys/socket.h +++ b/sys/sys/socket.h @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)socket.h 8.4 (Berkeley) 2/21/94 - * $Id: socket.h,v 1.20 1997/05/09 12:19:06 kjc Exp $ + * $Id: socket.h,v 1.21 1997/08/16 19:16:14 wollman Exp $ */ #ifndef _SYS_SOCKET_H_ @@ -379,6 +379,11 @@ int socketpair __P((int, int, int, int *)); __END_DECLS #else /* KERNEL */ +#ifdef MALLOC_DECLARE +MALLOC_DECLARE(M_SOCKET); +MALLOC_DECLARE(M_SONAME); +MALLOC_DECLARE(M_PCB); +#endif void pfctlinput __P((int, struct sockaddr *)); #endif /* !KERNEL */ #endif /* !_SYS_SOCKET_H_ */ diff --git a/sys/sys/tty.h b/sys/sys/tty.h index 81d2de1..bf0ec88 100644 --- a/sys/sys/tty.h +++ b/sys/sys/tty.h @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)tty.h 8.6 (Berkeley) 1/21/94 - * $Id: tty.h,v 1.38 1997/02/22 09:46:13 peter Exp $ + * $Id: tty.h,v 1.39 1997/09/14 02:25:41 peter Exp $ */ #ifndef _SYS_TTY_H_ @@ -213,6 +213,9 @@ struct speedtab { #define TSA_PTS_READ(tp) ((void *)&(tp)->t_canq) #ifdef KERNEL +#ifdef MALLOC_DECLARE +MALLOC_DECLARE(M_TTYS); +#endif extern struct tty *constty; /* Temporary virtual console. */ int b_to_q __P((char *cp, int cc, struct clist *q)); diff --git a/sys/sys/vnode.h b/sys/sys/vnode.h index acbccb5..9997769 100644 --- a/sys/sys/vnode.h +++ b/sys/sys/vnode.h @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)vnode.h 8.7 (Berkeley) 2/4/94 - * $Id: vnode.h,v 1.48 1997/09/14 02:25:41 peter Exp $ + * $Id: vnode.h,v 1.49 1997/09/21 04:24:09 dyson Exp $ */ #ifndef _SYS_VNODE_H_ @@ -202,6 +202,11 @@ struct vattr { #define VNOVAL (-1) #ifdef KERNEL + +#ifdef MALLOC_DECLARE +MALLOC_DECLARE(M_VNODE); +#endif + /* * Convert between vnode types and inode formats (since POSIX.1 * defines mode word of stat structure in terms of inode formats). diff --git a/sys/ufs/ffs/ffs_vfsops.c b/sys/ufs/ffs/ffs_vfsops.c index f8a8f91..05ee306 100644 --- a/sys/ufs/ffs/ffs_vfsops.c +++ b/sys/ufs/ffs/ffs_vfsops.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)ffs_vfsops.c 8.31 (Berkeley) 5/20/95 - * $Id: ffs_vfsops.c,v 1.57 1997/10/10 18:16:59 phk Exp $ + * $Id: ffs_vfsops.c,v 1.58 1997/10/11 18:31:36 phk Exp $ */ #include "opt_quota.h" @@ -64,7 +64,7 @@ #include #include -MALLOC_DEFINE(M_FFSNODE, "FFS node", "FFS vnode private part"); +static MALLOC_DEFINE(M_FFSNODE, "FFS node", "FFS vnode private part"); static int ffs_sbupdate __P((struct ufsmount *, int)); static int ffs_reload __P((struct mount *,struct ucred *,struct proc *)); diff --git a/sys/ufs/lfs/lfs_extern.h b/sys/ufs/lfs/lfs_extern.h index 7da63e2..acab203 100644 --- a/sys/ufs/lfs/lfs_extern.h +++ b/sys/ufs/lfs/lfs_extern.h @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)lfs_extern.h 8.6 (Berkeley) 5/8/95 - * $Id: lfs_extern.h,v 1.15 1997/03/23 00:45:15 bde Exp $ + * $Id: lfs_extern.h,v 1.16 1997/10/10 18:17:20 phk Exp $ */ #ifndef _UFS_LFS_LFS_EXTERN_H_ @@ -39,6 +39,9 @@ #ifdef KERNEL +MALLOC_DECLARE(M_LFSNODE); +MALLOC_DECLARE(M_SEGMENT); /* XXX should be M_LFSSEGMENT ?? */ + struct inode; struct mount; struct nameidata; diff --git a/sys/ufs/lfs/lfs_vfsops.c b/sys/ufs/lfs/lfs_vfsops.c index 141e811..1f17133 100644 --- a/sys/ufs/lfs/lfs_vfsops.c +++ b/sys/ufs/lfs/lfs_vfsops.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)lfs_vfsops.c 8.20 (Berkeley) 6/10/95 - * $Id: lfs_vfsops.c,v 1.22 1997/09/07 16:21:05 bde Exp $ + * $Id: lfs_vfsops.c,v 1.23 1997/10/10 18:17:21 phk Exp $ */ #include "opt_quota.h" @@ -42,11 +42,11 @@ #include #include #include +#include #include #include #include #include -#include #include @@ -58,6 +58,9 @@ #include #include +MALLOC_DEFINE(M_LFSNODE, "LFS node", "LFS vnode private part"); +MALLOC_DEFINE(M_SEGMENT, "LFS segment", "Segment for LFS"); + static int lfs_fhtovp __P((struct mount *, struct fid *, struct sockaddr *, struct vnode **, int *, struct ucred **)); static int lfs_mount __P((struct mount *, char *, caddr_t, diff --git a/sys/ufs/mfs/mfs_vfsops.c b/sys/ufs/mfs/mfs_vfsops.c index 5b42db8..a543852 100644 --- a/sys/ufs/mfs/mfs_vfsops.c +++ b/sys/ufs/mfs/mfs_vfsops.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)mfs_vfsops.c 8.11 (Berkeley) 6/19/95 - * $Id: mfs_vfsops.c,v 1.34 1997/10/10 18:17:42 phk Exp $ + * $Id: mfs_vfsops.c,v 1.35 1997/10/11 18:31:37 phk Exp $ */ #include @@ -61,7 +61,7 @@ # include /* console IO */ #endif -MALLOC_DEFINE(M_MFSNODE, "MFS node", "MFS vnode private part"); +static MALLOC_DEFINE(M_MFSNODE, "MFS node", "MFS vnode private part"); static int mfs_imageload __P((dev_t dev, caddr_t addr, int size)); extern int mfs_initminiroot __P((caddr_t base)); diff --git a/sys/ufs/ufs/ufs_ihash.c b/sys/ufs/ufs/ufs_ihash.c index 5ff8f34..83b29d4 100644 --- a/sys/ufs/ufs/ufs_ihash.c +++ b/sys/ufs/ufs/ufs_ihash.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)ufs_ihash.c 8.7 (Berkeley) 5/17/95 - * $Id$ + * $Id: ufs_ihash.c,v 1.8 1997/02/22 09:47:47 peter Exp $ */ #include @@ -44,6 +44,7 @@ #include #include +static MALLOC_DEFINE(M_UFSIHASH, "UFS ihash", "UFS Inode hash tables"); /* * Structures associated with inode cacheing. */ @@ -59,7 +60,7 @@ void ufs_ihashinit() { - ihashtbl = hashinit(desiredvnodes, M_UFSMNT, &ihash); + ihashtbl = hashinit(desiredvnodes, M_UFSIHASH, &ihash); simple_lock_init(&ufs_ihash_slock); } diff --git a/sys/ufs/ufs/ufs_quota.c b/sys/ufs/ufs/ufs_quota.c index 4cdd0cc..ddebfe3 100644 --- a/sys/ufs/ufs/ufs_quota.c +++ b/sys/ufs/ufs/ufs_quota.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)ufs_quota.c 8.5 (Berkeley) 5/20/95 - * $Id: ufs_quota.c,v 1.14 1997/08/02 14:33:24 bde Exp $ + * $Id: ufs_quota.c,v 1.15 1997/10/11 18:31:38 phk Exp $ */ #include @@ -51,7 +51,7 @@ #include #include -MALLOC_DEFINE(M_DQUOT, "UFS quota", "UFS quota entries"); +static MALLOC_DEFINE(M_DQUOT, "UFS quota", "UFS quota entries"); /* * Quota name to error message mapping. diff --git a/sys/ufs/ufs/ufs_vfsops.c b/sys/ufs/ufs/ufs_vfsops.c index ffc61f2..3ae27de 100644 --- a/sys/ufs/ufs/ufs_vfsops.c +++ b/sys/ufs/ufs/ufs_vfsops.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)ufs_vfsops.c 8.8 (Berkeley) 5/20/95 - * $Id: ufs_vfsops.c,v 1.9 1997/08/02 14:33:24 bde Exp $ + * $Id: ufs_vfsops.c,v 1.10 1997/08/16 19:16:27 wollman Exp $ */ #include "opt_quota.h" @@ -44,6 +44,7 @@ #include #include #include +#include #include #include @@ -51,6 +52,7 @@ #include #include +MALLOC_DEFINE(M_UFSMNT, "UFS mount", "UFS mount structure"); /* * Make a filesystem operational. * Nothing to do at the moment. diff --git a/sys/ufs/ufs/ufsmount.h b/sys/ufs/ufs/ufsmount.h index 2761f65..d57dd59 100644 --- a/sys/ufs/ufs/ufsmount.h +++ b/sys/ufs/ufs/ufsmount.h @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)ufsmount.h 8.6 (Berkeley) 3/30/95 - * $Id: ufsmount.h,v 1.8 1997/09/22 21:24:03 joerg Exp $ + * $Id: ufsmount.h,v 1.9 1997/10/10 18:18:13 phk Exp $ */ #ifndef _UFS_UFS_UFSMOUNT_H_ @@ -56,6 +56,11 @@ struct mfs_args { }; #ifdef KERNEL + +#ifdef MALLOC_DECLARE +MALLOC_DECLARE(M_UFSMNT); +#endif + struct buf; struct inode; struct nameidata; diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c index fed57fe..2b9b996 100644 --- a/sys/vm/vm_map.c +++ b/sys/vm/vm_map.c @@ -61,7 +61,7 @@ * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. * - * $Id: vm_map.c,v 1.91 1997/09/21 04:24:20 dyson Exp $ + * $Id: vm_map.c,v 1.92 1997/10/11 18:31:39 phk Exp $ */ /* @@ -93,7 +93,7 @@ #include #include -MALLOC_DEFINE(M_VMMAP, "VM map", "VM map structures"); +static MALLOC_DEFINE(M_VMMAP, "VM map", "VM map structures"); /* * Virtual memory maps provide for the mapping, protection, diff --git a/sys/vm/vm_pager.c b/sys/vm/vm_pager.c index f093a9b..bfc2cc1 100644 --- a/sys/vm/vm_pager.c +++ b/sys/vm/vm_pager.c @@ -61,7 +61,7 @@ * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. * - * $Id: vm_pager.c,v 1.28 1997/08/25 22:15:28 bde Exp $ + * $Id: vm_pager.c,v 1.29 1997/09/01 03:17:28 bde Exp $ */ /* @@ -73,6 +73,7 @@ #include #include #include +#include #include #include @@ -82,6 +83,8 @@ #include #include +MALLOC_DEFINE(M_VMPGDATA, "VM pgdata", "XXX: VM pager private data"); + extern struct pagerops defaultpagerops; extern struct pagerops swappagerops; extern struct pagerops vnodepagerops; diff --git a/sys/vm/vm_pager.h b/sys/vm/vm_pager.h index a965624..c809865 100644 --- a/sys/vm/vm_pager.h +++ b/sys/vm/vm_pager.h @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)vm_pager.h 8.4 (Berkeley) 1/12/94 - * $Id$ + * $Id: vm_pager.h,v 1.13 1997/02/22 09:48:37 peter Exp $ */ /* @@ -75,6 +75,11 @@ struct pagerops { #define VM_PAGER_AGAIN 5 #ifdef KERNEL + +#ifdef MALLOC_DECLARE +MALLOC_DECLARE(M_VMPGDATA); +#endif + extern vm_map_t pager_map; extern int pager_map_size; diff --git a/sys/vm/vm_zone.c b/sys/vm/vm_zone.c index 1c5b6730..94eacc2 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.8 1997/09/21 11:41:12 peter Exp $ + * $Id: vm_zone.c,v 1.9 1997/10/11 18:31:40 phk Exp $ */ #include @@ -35,7 +35,7 @@ #include #include -MALLOC_DEFINE(M_ZONE, "ZONE", "Zone header"); +static MALLOC_DEFINE(M_ZONE, "ZONE", "Zone header"); /* * This file comprises a very simple zone allocator. This is used -- cgit v1.1