diff options
author | phk <phk@FreeBSD.org> | 1997-10-12 20:26:33 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 1997-10-12 20:26:33 +0000 |
commit | 36e7a51ea1dedf0fc860ff3106aee1db1ab3b1f5 (patch) | |
tree | e21c1d8330cbd5fba838afec549f8e4f0f66e451 /sys/ufs | |
parent | 8ae70d2227594ff4a283453ca3cc3031eb78c14b (diff) | |
download | FreeBSD-src-36e7a51ea1dedf0fc860ff3106aee1db1ab3b1f5.zip FreeBSD-src-36e7a51ea1dedf0fc860ff3106aee1db1ab3b1f5.tar.gz |
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
Diffstat (limited to 'sys/ufs')
-rw-r--r-- | sys/ufs/ffs/ffs_vfsops.c | 4 | ||||
-rw-r--r-- | sys/ufs/lfs/lfs_extern.h | 5 | ||||
-rw-r--r-- | sys/ufs/lfs/lfs_vfsops.c | 7 | ||||
-rw-r--r-- | sys/ufs/mfs/mfs_vfsops.c | 4 | ||||
-rw-r--r-- | sys/ufs/ufs/ufs_ihash.c | 5 | ||||
-rw-r--r-- | sys/ufs/ufs/ufs_quota.c | 4 | ||||
-rw-r--r-- | sys/ufs/ufs/ufs_vfsops.c | 4 | ||||
-rw-r--r-- | sys/ufs/ufs/ufsmount.h | 7 |
8 files changed, 27 insertions, 13 deletions
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 <vm/vm_page.h> #include <vm/vm_extern.h> -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 <sys/proc.h> #include <sys/kernel.h> #include <sys/vnode.h> +#include <sys/malloc.h> #include <sys/mount.h> #include <sys/buf.h> #include <sys/fcntl.h> #include <sys/disklabel.h> -#include <sys/malloc.h> #include <miscfs/specfs/specdev.h> @@ -58,6 +58,9 @@ #include <ufs/lfs/lfs.h> #include <ufs/lfs/lfs_extern.h> +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 <sys/param.h> @@ -61,7 +61,7 @@ # include <i386/i386/cons.h> /* 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 <sys/param.h> @@ -44,6 +44,7 @@ #include <ufs/ufs/inode.h> #include <ufs/ufs/ufs_extern.h> +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 <sys/param.h> @@ -51,7 +51,7 @@ #include <ufs/ufs/inode.h> #include <ufs/ufs/ufsmount.h> -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 <sys/param.h> #include <sys/mount.h> #include <sys/proc.h> +#include <sys/malloc.h> #include <sys/vnode.h> #include <ufs/ufs/quota.h> @@ -51,6 +52,7 @@ #include <ufs/ufs/ufsmount.h> #include <ufs/ufs/ufs_extern.h> +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; |