Distribute and statizice a lot of the malloc M_* types.
Substantial input from: bde
This commit is contained in:
parent
3f3e72d5f9
commit
55166637cd
@ -39,7 +39,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)pmap.c 7.7 (Berkeley) 5/12/91
|
||||
* $Id: pmap.c,v 1.161 1997/09/07 01:15:13 dyson Exp $
|
||||
* $Id: pmap.c,v 1.162 1997/09/21 05:50:02 dyson Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -1504,7 +1504,8 @@ pmap_destroy(pmap)
|
||||
count = --pmap->pm_count;
|
||||
if (count == 0) {
|
||||
pmap_release(pmap);
|
||||
free((caddr_t) pmap, M_VMPMAP);
|
||||
panic("destroying a pmap is not yet implemented");
|
||||
/* free((caddr_t) pmap, M_VMPMAP); */
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $Id: msdosfs_denode.c,v 1.25 1997/08/26 04:36:21 dyson Exp $ */
|
||||
/* $Id: msdosfs_denode.c,v 1.26 1997/09/02 20:06:15 bde Exp $ */
|
||||
/* $NetBSD: msdosfs_denode.c,v 1.9 1994/08/21 18:44:00 ws Exp $ */
|
||||
|
||||
/*-
|
||||
@ -66,6 +66,8 @@
|
||||
#include <msdosfs/denode.h>
|
||||
#include <msdosfs/fat.h>
|
||||
|
||||
MALLOC_DEFINE(M_MSDOSFSNODE, "MSDOSFS node", "MSDOSFS vnode private part");
|
||||
|
||||
struct denode **dehashtbl;
|
||||
u_long dehash; /* size of hash table - 1 */
|
||||
#define DEHASH(dev, deno) (dehashtbl[((dev) + (deno)) & dehash])
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $Id: msdosfs_vfsops.c,v 1.19 1997/03/23 03:37:06 bde Exp $ */
|
||||
/* $Id: msdosfs_vfsops.c,v 1.20 1997/08/16 19:15:24 wollman Exp $ */
|
||||
/* $NetBSD: msdosfs_vfsops.c,v 1.19 1994/08/21 18:44:10 ws Exp $ */
|
||||
|
||||
/*-
|
||||
@ -67,6 +67,8 @@
|
||||
#include <msdosfs/msdosfsmount.h>
|
||||
#include <msdosfs/fat.h>
|
||||
|
||||
MALLOC_DEFINE(M_MSDOSFSFAT, "MSDOSFS FAT", "MSDOSFS file allocation table");
|
||||
|
||||
static int mountmsdosfs __P((struct vnode *devvp, struct mount *mp,
|
||||
struct proc *p));
|
||||
static int msdosfs_fhtovp __P((struct mount *, struct fid *,
|
||||
|
@ -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_type_t M_EXT2NODE = { "EXT2 nodes", "EXT2 Filsystem inodes"};
|
||||
MALLOC_DEFINE(M_EXT2NODE, "EXT2 nodes", "EXT2 Filsystem inodes");
|
||||
|
||||
static struct vfsops ext2fs_vfsops = {
|
||||
ext2_mount,
|
||||
|
@ -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_type_t M_EXT2NODE = { "EXT2 nodes", "EXT2 Filsystem inodes"};
|
||||
MALLOC_DEFINE(M_EXT2NODE, "EXT2 nodes", "EXT2 Filsystem inodes");
|
||||
|
||||
static struct vfsops ext2fs_vfsops = {
|
||||
ext2_mount,
|
||||
|
@ -39,7 +39,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)pmap.c 7.7 (Berkeley) 5/12/91
|
||||
* $Id: pmap.c,v 1.161 1997/09/07 01:15:13 dyson Exp $
|
||||
* $Id: pmap.c,v 1.162 1997/09/21 05:50:02 dyson Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -1504,7 +1504,8 @@ pmap_destroy(pmap)
|
||||
count = --pmap->pm_count;
|
||||
if (count == 0) {
|
||||
pmap_release(pmap);
|
||||
free((caddr_t) pmap, M_VMPMAP);
|
||||
panic("destroying a pmap is not yet implemented");
|
||||
/* free((caddr_t) pmap, M_VMPMAP); */
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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.92 1997/09/09 12:48:59 jmg Exp $
|
||||
** $Id: userconfig.c,v 1.93 1997/09/18 08:00:48 jmg Exp $
|
||||
**/
|
||||
|
||||
/**
|
||||
@ -126,6 +126,8 @@
|
||||
|
||||
#include <pci/pcivar.h>
|
||||
|
||||
MALLOC_DEFINE(M_DEVL, "isa_devlist", "isa_device lists in userconfig()");
|
||||
|
||||
static struct isa_device *isa_devlist; /* list read by dset to extract changes */
|
||||
|
||||
#ifdef USERCONFIG_BOOT
|
||||
@ -2365,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.92 1997/09/09 12:48:59 jmg Exp $
|
||||
* $Id: userconfig.c,v 1.93 1997/09/18 08:00:48 jmg Exp $
|
||||
*/
|
||||
|
||||
#include "scbus.h"
|
||||
|
@ -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.8 1997/02/22 09:38:58 peter Exp $
|
||||
* $Id: inflate.c,v 1.9 1997/08/02 14:31:25 bde Exp $
|
||||
*
|
||||
*
|
||||
*/
|
||||
@ -19,6 +19,8 @@
|
||||
#endif
|
||||
#include <sys/malloc.h>
|
||||
|
||||
MALLOC_DEFINE(M_GZIP, "Gzip trees", "Gzip trees");
|
||||
|
||||
/* needed to make inflate() work */
|
||||
#define uch u_char
|
||||
#define ush u_short
|
||||
|
@ -36,7 +36,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)kern_descrip.c 8.6 (Berkeley) 4/19/94
|
||||
* $Id: kern_descrip.c,v 1.39 1997/08/26 00:09:44 bde Exp $
|
||||
* $Id: kern_descrip.c,v 1.40 1997/09/14 02:52:13 peter Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -66,6 +66,8 @@
|
||||
#include <sys/devfsext.h>
|
||||
#endif /*DEVFS*/
|
||||
|
||||
MALLOC_DEFINE(M_FILEDESC, "file desc", "Open file descriptor table");
|
||||
|
||||
static d_open_t fdopen;
|
||||
#define NUMFDESC 64
|
||||
|
||||
|
@ -36,7 +36,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)kern_exit.c 8.7 (Berkeley) 2/12/94
|
||||
* $Id: kern_exit.c,v 1.55 1997/09/13 19:42:10 joerg Exp $
|
||||
* $Id: kern_exit.c,v 1.56 1997/09/21 22:00:10 gibbs Exp $
|
||||
*/
|
||||
|
||||
#include "opt_ktrace.h"
|
||||
@ -70,6 +70,8 @@
|
||||
#include <vm/pmap.h>
|
||||
#include <vm/vm_map.h>
|
||||
|
||||
MALLOC_DEFINE(M_ZOMBIE, "zombie", "zombie proc status");
|
||||
|
||||
static int wait1 __P((struct proc *, struct wait_args *, int [], int));
|
||||
|
||||
/*
|
||||
|
@ -31,7 +31,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)kern_ktrace.c 8.2 (Berkeley) 9/23/93
|
||||
* $Id: kern_ktrace.c,v 1.17 1997/02/22 09:39:05 peter Exp $
|
||||
* $Id: kern_ktrace.c,v 1.18 1997/03/23 03:36:19 bde Exp $
|
||||
*/
|
||||
|
||||
#include "opt_ktrace.h"
|
||||
@ -47,6 +47,8 @@
|
||||
#include <sys/malloc.h>
|
||||
#include <sys/syslog.h>
|
||||
|
||||
MALLOC_DEFINE(M_KTRACE, "KTRACE", "KTRACE");
|
||||
|
||||
#ifdef KTRACE
|
||||
static struct ktr_header *ktrgetheader __P((int type));
|
||||
static void ktrwrite __P((struct vnode *, struct ktr_header *));
|
||||
|
@ -34,7 +34,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)ufs_lockf.c 8.3 (Berkeley) 1/6/94
|
||||
* $Id: kern_lockf.c,v 1.13 1997/02/22 09:39:06 peter Exp $
|
||||
* $Id: kern_lockf.c,v 1.14 1997/04/01 10:30:06 bde Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -60,10 +60,13 @@ static int maxlockdepth = MAXDEPTH;
|
||||
#include <ufs/ufs/quota.h>
|
||||
#include <ufs/ufs/inode.h>
|
||||
|
||||
|
||||
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");
|
||||
|
||||
#define NOLOCKF (struct lockf *)0
|
||||
#define SELF 0x1
|
||||
#define OTHERS 0x2
|
||||
|
@ -31,7 +31,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)kern_proc.c 8.7 (Berkeley) 2/14/95
|
||||
* $Id: kern_proc.c,v 1.27 1997/06/27 15:42:05 tegge Exp $
|
||||
* $Id: kern_proc.c,v 1.28 1997/08/02 14:31:33 bde Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -48,6 +48,8 @@
|
||||
#include <vm/vm_map.h>
|
||||
#include <sys/user.h>
|
||||
|
||||
MALLOC_DEFINE(M_PGRP, "pgrp", "process group header");
|
||||
|
||||
struct prochd qs[NQS]; /* as good a place as any... */
|
||||
struct prochd rtqs[NQS]; /* Space for REALTIME queues too */
|
||||
struct prochd idqs[NQS]; /* Space for IDLE queues too */
|
||||
|
@ -37,7 +37,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)kern_sysctl.c 8.4 (Berkeley) 4/14/94
|
||||
* $Id: kern_sysctl.c,v 1.69 1997/02/22 09:39:12 peter Exp $
|
||||
* $Id: kern_sysctl.c,v 1.70 1997/04/09 15:23:09 bde Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -51,6 +51,8 @@
|
||||
#include <vm/vm.h>
|
||||
#include <vm/vm_extern.h>
|
||||
|
||||
MALLOC_DEFINE(M_SYSCTL, "sysctl", "sysctl internal magic");
|
||||
|
||||
/*
|
||||
* Locking and stats
|
||||
*/
|
||||
|
@ -31,7 +31,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)subr_prof.c 8.3 (Berkeley) 9/23/93
|
||||
* $Id$
|
||||
* $Id: subr_prof.c,v 1.20 1997/02/22 09:39:17 peter Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -48,6 +48,8 @@
|
||||
#include <sys/malloc.h>
|
||||
#include <sys/gmon.h>
|
||||
|
||||
MALLOC_DEFINE(M_GPROF, "gprof", "kernel profiling buffer");
|
||||
|
||||
static void kmstartup __P((void *));
|
||||
SYSINIT(kmem, SI_SUB_KPROF, SI_ORDER_FIRST, kmstartup, NULL)
|
||||
|
||||
|
@ -36,7 +36,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)sys_generic.c 8.5 (Berkeley) 1/21/94
|
||||
* $Id: sys_generic.c,v 1.28 1997/09/02 20:05:52 bde Exp $
|
||||
* $Id: sys_generic.c,v 1.29 1997/09/14 02:30:32 peter Exp $
|
||||
*/
|
||||
|
||||
#include "opt_ktrace.h"
|
||||
@ -61,6 +61,9 @@
|
||||
#include <sys/ktrace.h>
|
||||
#endif
|
||||
|
||||
MALLOC_DEFINE(M_IOCTLOPS, "ioctlops", "ioctl data buffer");
|
||||
MALLOC_DEFINE(M_SELECT, "select", "select() buffer");
|
||||
|
||||
static int selscan __P((struct proc *, fd_mask **, fd_mask **, int, int *));
|
||||
static int pollscan __P((struct proc *, struct pollfd *, int, int *));
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $Id: sysv_shm.c,v 1.28 1997/02/22 09:39:23 peter Exp $ */
|
||||
/* $Id: sysv_shm.c,v 1.29 1997/08/02 14:31:39 bde Exp $ */
|
||||
/* $NetBSD: sysv_shm.c,v 1.23 1994/07/04 23:25:12 glass Exp $ */
|
||||
|
||||
/*
|
||||
@ -65,6 +65,8 @@ 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 void shminit __P((void *));
|
||||
SYSINIT(sysv_shm, SI_SUB_SYSV_SHM, SI_ORDER_FIRST, shminit, NULL)
|
||||
|
||||
|
@ -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.5 1997/10/09 04:14:41 dyson Exp $
|
||||
* $Id: vfs_aio.c,v 1.6 1997/10/11 01:07:03 dyson Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -54,6 +54,8 @@
|
||||
|
||||
#include <machine/cpu.h>
|
||||
|
||||
MALLOC_DEFINE(M_AIO, "AIO", "AIO structure(s)");
|
||||
|
||||
#define AIOCBLIST_CANCELLED 0x1
|
||||
#define AIOCBLIST_RUNDOWN 0x4
|
||||
#define AIOCBLIST_ASYNCFREE 0x8
|
||||
|
@ -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.127 1997/09/21 04:49:30 dyson Exp $
|
||||
* $Id: vfs_bio.c,v 1.128 1997/09/21 22:00:25 gibbs Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -60,6 +60,8 @@
|
||||
|
||||
#include <miscfs/specfs/specdev.h>
|
||||
|
||||
MALLOC_DEFINE(M_BIOBUF, "BIO buffer", "BIO buffer");
|
||||
|
||||
static void vfs_update __P((void));
|
||||
static struct proc *updateproc;
|
||||
static struct kproc_desc up_kp = {
|
||||
|
@ -36,7 +36,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)vfs_subr.c 8.31 (Berkeley) 5/26/95
|
||||
* $Id: vfs_subr.c,v 1.107 1997/09/26 08:08:58 phk Exp $
|
||||
* $Id: vfs_subr.c,v 1.108 1997/10/11 07:34:27 phk Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -68,6 +68,8 @@
|
||||
|
||||
#include <miscfs/specfs/specdev.h>
|
||||
|
||||
MALLOC_DEFINE(M_NETADDR, "Export Host", "Export host address structure");
|
||||
|
||||
#ifdef DDB
|
||||
extern void printlockedvnodes __P((void));
|
||||
#endif
|
||||
|
@ -36,7 +36,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)vfs_subr.c 8.31 (Berkeley) 5/26/95
|
||||
* $Id: vfs_subr.c,v 1.107 1997/09/26 08:08:58 phk Exp $
|
||||
* $Id: vfs_subr.c,v 1.108 1997/10/11 07:34:27 phk Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -68,6 +68,8 @@
|
||||
|
||||
#include <miscfs/specfs/specdev.h>
|
||||
|
||||
MALLOC_DEFINE(M_NETADDR, "Export Host", "Export host address structure");
|
||||
|
||||
#ifdef DDB
|
||||
extern void printlockedvnodes __P((void));
|
||||
#endif
|
||||
|
@ -2,7 +2,7 @@
|
||||
/*
|
||||
* Written by Julian Elischer (julian@DIALix.oz.au)
|
||||
*
|
||||
* $Header: /home/ncvs/src/sys/miscfs/devfs/devfs_tree.c,v 1.41 1997/09/16 09:10:18 julian Exp $
|
||||
* $Header: /home/ncvs/src/sys/miscfs/devfs/devfs_tree.c,v 1.42 1997/10/10 07:54:05 julian Exp $
|
||||
*/
|
||||
|
||||
#include "opt_devfs.h"
|
||||
@ -22,6 +22,10 @@
|
||||
|
||||
#include <miscfs/devfs/devfsdefs.h>
|
||||
|
||||
|
||||
MALLOC_DEFINE(M_DEVFSNODE, "DEVFS node", "DEVFS node");
|
||||
MALLOC_DEFINE(M_DEVFSNAME, "DEVFS name", "DEVFS name");
|
||||
|
||||
devnm_p dev_root; /* root of the backing tree */
|
||||
struct mount *devfs_hidden_mount;
|
||||
int devfs_up_and_going;
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Written by Julian Elischer (julian@DIALix.oz.au)
|
||||
*
|
||||
* $Header: /home/ncvs/src/sys/miscfs/devfs/devfs_vfsops.c,v 1.19 1997/08/02 14:31:55 bde Exp $
|
||||
* $Header: /home/ncvs/src/sys/miscfs/devfs/devfs_vfsops.c,v 1.20 1997/08/16 19:15:10 wollman Exp $
|
||||
*
|
||||
*
|
||||
*/
|
||||
@ -15,6 +15,8 @@
|
||||
|
||||
#include <miscfs/devfs/devfsdefs.h>
|
||||
|
||||
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);
|
||||
|
||||
|
@ -7,13 +7,11 @@
|
||||
/*
|
||||
* Written by Julian Elischer (julian@DIALIX.oz.au)
|
||||
*
|
||||
* $Header: /home/ncvs/src/sys/miscfs/devfs/devfsdefs.h,v 1.10 1996/09/10 08:27:42 bde Exp $
|
||||
* $Header: /home/ncvs/src/sys/miscfs/devfs/devfsdefs.h,v 1.11 1996/11/21 07:19:00 julian Exp $
|
||||
*/
|
||||
|
||||
/* first a couple of defines for compatibility with inodes */
|
||||
|
||||
#define M_DEVFSNAME M_DEVFSBACK
|
||||
|
||||
#define ISUID 04000 /* set user identifier when exec'ing */
|
||||
#define ISGID 02000 /* set group identifier when exec'ing */
|
||||
#define ISVTX 01000 /* save execution information on exit */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $Id: msdosfs_denode.c,v 1.25 1997/08/26 04:36:21 dyson Exp $ */
|
||||
/* $Id: msdosfs_denode.c,v 1.26 1997/09/02 20:06:15 bde Exp $ */
|
||||
/* $NetBSD: msdosfs_denode.c,v 1.9 1994/08/21 18:44:00 ws Exp $ */
|
||||
|
||||
/*-
|
||||
@ -66,6 +66,8 @@
|
||||
#include <msdosfs/denode.h>
|
||||
#include <msdosfs/fat.h>
|
||||
|
||||
MALLOC_DEFINE(M_MSDOSFSNODE, "MSDOSFS node", "MSDOSFS vnode private part");
|
||||
|
||||
struct denode **dehashtbl;
|
||||
u_long dehash; /* size of hash table - 1 */
|
||||
#define DEHASH(dev, deno) (dehashtbl[((dev) + (deno)) & dehash])
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $Id: msdosfs_vfsops.c,v 1.19 1997/03/23 03:37:06 bde Exp $ */
|
||||
/* $Id: msdosfs_vfsops.c,v 1.20 1997/08/16 19:15:24 wollman Exp $ */
|
||||
/* $NetBSD: msdosfs_vfsops.c,v 1.19 1994/08/21 18:44:10 ws Exp $ */
|
||||
|
||||
/*-
|
||||
@ -67,6 +67,8 @@
|
||||
#include <msdosfs/msdosfsmount.h>
|
||||
#include <msdosfs/fat.h>
|
||||
|
||||
MALLOC_DEFINE(M_MSDOSFSFAT, "MSDOSFS FAT", "MSDOSFS file allocation table");
|
||||
|
||||
static int mountmsdosfs __P((struct vnode *devvp, struct mount *mp,
|
||||
struct proc *p));
|
||||
static int msdosfs_fhtovp __P((struct mount *, struct fid *,
|
||||
|
@ -35,7 +35,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)igmp.c 8.1 (Berkeley) 7/19/93
|
||||
* $Id: igmp.c,v 1.22 1997/09/02 01:19:05 bde Exp $
|
||||
* $Id: igmp.c,v 1.23 1997/09/16 11:43:50 bde Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -69,6 +69,8 @@
|
||||
#include <netinet/igmp.h>
|
||||
#include <netinet/igmp_var.h>
|
||||
|
||||
MALLOC_DEFINE(M_MRTABLE, "mrt", "multicast routing tables");
|
||||
|
||||
static struct router_info *
|
||||
find_rti __P((struct ifnet *ifp));
|
||||
|
||||
|
@ -31,7 +31,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)in.c 8.4 (Berkeley) 1/9/95
|
||||
* $Id: in.c,v 1.34 1997/04/27 20:01:03 wollman Exp $
|
||||
* $Id: in.c,v 1.35 1997/08/02 14:32:49 bde Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -51,6 +51,8 @@
|
||||
|
||||
#include <netinet/igmp_var.h>
|
||||
|
||||
MALLOC_DEFINE(M_IPMADDR, "in_multi", "internet multicast address");
|
||||
|
||||
static void in_socktrim __P((struct sockaddr_in *));
|
||||
static int in_ifinit __P((struct ifnet *,
|
||||
struct in_ifaddr *, struct sockaddr_in *, int));
|
||||
|
@ -31,7 +31,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)ip_output.c 8.3 (Berkeley) 1/21/94
|
||||
* $Id: ip_output.c,v 1.57 1997/06/02 05:02:37 julian Exp $
|
||||
* $Id: ip_output.c,v 1.58 1997/08/02 14:32:53 bde Exp $
|
||||
*/
|
||||
|
||||
#define _IP_VHL
|
||||
@ -59,6 +59,8 @@
|
||||
#endif
|
||||
#include <machine/in_cksum.h>
|
||||
|
||||
MALLOC_DEFINE(M_IPMOPTS, "ip_moptions", "internet multicast options");
|
||||
|
||||
#if !defined(COMPAT_IPFW) || COMPAT_IPFW == 1
|
||||
#undef COMPAT_IPFW
|
||||
#define COMPAT_IPFW 1
|
||||
|
@ -101,6 +101,8 @@ Research Laboratory (NRL).
|
||||
#include <netkey/key.h>
|
||||
#include <netkey/key_debug.h>
|
||||
|
||||
MALLOC_DEFINE(M_SECA, "key mgmt", "security associations, key management");
|
||||
|
||||
#define SOCKADDR struct sockaddr
|
||||
|
||||
#define KMALLOC(p, t, n) (p = (t) malloc((unsigned long)(n), M_SECA, M_DONTWAIT))
|
||||
|
@ -34,7 +34,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)nfs_node.c 8.6 (Berkeley) 5/22/95
|
||||
* $Id: nfs_node.c,v 1.18 1997/08/02 14:33:07 bde Exp $
|
||||
* $Id: nfs_node.c,v 1.19 1997/09/21 04:23:45 dyson Exp $
|
||||
*/
|
||||
|
||||
|
||||
@ -51,6 +51,8 @@
|
||||
#include <nfs/nfsnode.h>
|
||||
#include <nfs/nfsmount.h>
|
||||
|
||||
MALLOC_DEFINE(M_NFSNODE, "NFS node", "NFS vnode private part");
|
||||
|
||||
LIST_HEAD(nfsnodehashhead, nfsnode) *nfsnodehashtbl;
|
||||
u_long nfsnodehash;
|
||||
|
||||
|
@ -34,7 +34,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)nfs_nqlease.c 8.9 (Berkeley) 5/20/95
|
||||
* $Id: nfs_nqlease.c,v 1.27 1997/08/16 19:15:55 wollman Exp $
|
||||
* $Id: nfs_nqlease.c,v 1.28 1997/09/02 01:19:30 bde Exp $
|
||||
*/
|
||||
|
||||
|
||||
@ -76,6 +76,8 @@
|
||||
#include <nfs/nfsnode.h>
|
||||
#include <nfs/nfsmount.h>
|
||||
|
||||
MALLOC_DEFINE(M_NQMHOST, "NQNFS Host", "Nqnfs host address table");
|
||||
|
||||
time_t nqnfsstarttime = (time_t)0;
|
||||
int nqsrv_clockskew = NQ_CLOCKSKEW;
|
||||
int nqsrv_writeslack = NQ_WRITESLACK;
|
||||
|
@ -34,7 +34,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)nfs_syscalls.c 8.5 (Berkeley) 3/30/95
|
||||
* $Id: nfs_syscalls.c,v 1.26 1997/07/16 09:06:29 dfr Exp $
|
||||
* $Id: nfs_syscalls.c,v 1.27 1997/08/16 19:16:00 wollman Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -75,6 +75,8 @@
|
||||
#include <nfs/nqnfs.h>
|
||||
#include <nfs/nfsrtt.h>
|
||||
|
||||
MALLOC_DEFINE(M_NFSSVC, "NFS srvsock", "Nfs server structure");
|
||||
|
||||
/* Global defs. */
|
||||
extern int (*nfsrv3_procs[NFS_NPROCS]) __P((struct nfsrv_descript *nd,
|
||||
struct nfssvc_sock *slp,
|
||||
|
@ -34,7 +34,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)nfs_syscalls.c 8.5 (Berkeley) 3/30/95
|
||||
* $Id: nfs_syscalls.c,v 1.26 1997/07/16 09:06:29 dfr Exp $
|
||||
* $Id: nfs_syscalls.c,v 1.27 1997/08/16 19:16:00 wollman Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -75,6 +75,8 @@
|
||||
#include <nfs/nqnfs.h>
|
||||
#include <nfs/nfsrtt.h>
|
||||
|
||||
MALLOC_DEFINE(M_NFSSVC, "NFS srvsock", "Nfs server structure");
|
||||
|
||||
/* Global defs. */
|
||||
extern int (*nfsrv3_procs[NFS_NPROCS]) __P((struct nfsrv_descript *nd,
|
||||
struct nfssvc_sock *slp,
|
||||
|
@ -34,7 +34,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)nfs_node.c 8.6 (Berkeley) 5/22/95
|
||||
* $Id: nfs_node.c,v 1.18 1997/08/02 14:33:07 bde Exp $
|
||||
* $Id: nfs_node.c,v 1.19 1997/09/21 04:23:45 dyson Exp $
|
||||
*/
|
||||
|
||||
|
||||
@ -51,6 +51,8 @@
|
||||
#include <nfs/nfsnode.h>
|
||||
#include <nfs/nfsmount.h>
|
||||
|
||||
MALLOC_DEFINE(M_NFSNODE, "NFS node", "NFS vnode private part");
|
||||
|
||||
LIST_HEAD(nfsnodehashhead, nfsnode) *nfsnodehashtbl;
|
||||
u_long nfsnodehash;
|
||||
|
||||
|
@ -34,7 +34,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)nfs_syscalls.c 8.5 (Berkeley) 3/30/95
|
||||
* $Id: nfs_syscalls.c,v 1.26 1997/07/16 09:06:29 dfr Exp $
|
||||
* $Id: nfs_syscalls.c,v 1.27 1997/08/16 19:16:00 wollman Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -75,6 +75,8 @@
|
||||
#include <nfs/nqnfs.h>
|
||||
#include <nfs/nfsrtt.h>
|
||||
|
||||
MALLOC_DEFINE(M_NFSSVC, "NFS srvsock", "Nfs server structure");
|
||||
|
||||
/* Global defs. */
|
||||
extern int (*nfsrv3_procs[NFS_NPROCS]) __P((struct nfsrv_descript *nd,
|
||||
struct nfssvc_sock *slp,
|
||||
|
@ -31,7 +31,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)malloc.h 8.5 (Berkeley) 5/3/95
|
||||
* $Id: malloc.h,v 1.27 1997/10/10 18:15:45 phk Exp $
|
||||
* $Id: malloc.h,v 1.28 1997/10/11 13:10:17 phk Exp $
|
||||
*/
|
||||
|
||||
#ifndef _SYS_MALLOC_H_
|
||||
@ -47,8 +47,8 @@
|
||||
#define M_KERNEL 0x0002
|
||||
|
||||
struct malloc_type {
|
||||
char *ks_shortdesc; /* Short description */
|
||||
char *ks_longdesc; /* Long description */
|
||||
const char *ks_shortdesc; /* Short description */
|
||||
const char *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 */
|
||||
@ -58,89 +58,62 @@ struct malloc_type {
|
||||
long ks_maxused; /* maximum number ever used */
|
||||
long ks_limit; /* most that are allowed to exist */
|
||||
long ks_size; /* sizes of this thing that are allocated */
|
||||
long ks_spare;
|
||||
};
|
||||
|
||||
typedef struct malloc_type malloc_type_t[1];
|
||||
#define MALLOC_DEFINE(type, shortdesc, longdesc) \
|
||||
struct malloc_type type[1] = { { shortdesc, longdesc } }; \
|
||||
struct __hack
|
||||
|
||||
#define MALLOC_DECLARE(type) \
|
||||
extern struct malloc_type type[1]; \
|
||||
struct __hack
|
||||
|
||||
#ifdef MALLOC_INSTANTIATE
|
||||
#define MALLOC_MAKE_TYPE(type, short, long) \
|
||||
malloc_type_t type = {{short, long}}
|
||||
MALLOC_DEFINE(type, short, long);
|
||||
#else
|
||||
#define MALLOC_MAKE_TYPE(type, short, long) extern malloc_type_t type;
|
||||
#define MALLOC_MAKE_TYPE(type, short, long) \
|
||||
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_SOCKET, "socket", "socket structure");
|
||||
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_ZOMBIE, "zombie", "zombie proc status");
|
||||
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_GPROF, "gprof", "kernel profiling buffer");
|
||||
MALLOC_MAKE_TYPE(M_IOCTLOPS, "ioctlops", "ioctl data buffer");
|
||||
MALLOC_MAKE_TYPE(M_CRED, "cred", "credentials");
|
||||
MALLOC_MAKE_TYPE(M_PGRP, "pgrp", "process group header");
|
||||
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_NFSNODE, "NFS node", "NFS vnode private part");
|
||||
MALLOC_MAKE_TYPE(M_VNODE, "vnodes", "Dynamically allocated vnodes");
|
||||
MALLOC_MAKE_TYPE(M_CACHE, "namecache", "Dynamically allocated cache entries");
|
||||
MALLOC_MAKE_TYPE(M_DQUOT, "UFS quota", "UFS quota entries");
|
||||
MALLOC_MAKE_TYPE(M_UFSMNT, "UFS mount", "UFS mount structure");
|
||||
MALLOC_MAKE_TYPE(M_SHM, "shm", "SVID compatible shared memory segments");
|
||||
MALLOC_MAKE_TYPE(M_VMMAP, "VM map", "VM map structures");
|
||||
MALLOC_MAKE_TYPE(M_VMPMAP, "VM pmap", "VM pmap"); /* XXX only free() ??? */
|
||||
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_FILEDESC, "file desc", "Open file descriptor table");
|
||||
MALLOC_MAKE_TYPE(M_LOCKF, "lockf", "Byte-range locking structures");
|
||||
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_FFSNODE, "FFS node", "FFS vnode private part");
|
||||
MALLOC_MAKE_TYPE(M_MFSNODE, "MFS node", "MFS vnode private part");
|
||||
MALLOC_MAKE_TYPE(M_NQLEASE, "NQNFS Lease", "Nqnfs lease");
|
||||
MALLOC_MAKE_TYPE(M_NQMHOST, "NQNFS Host", "Nqnfs host address table");
|
||||
MALLOC_MAKE_TYPE(M_NETADDR, "Export Host", "Export host address structure");
|
||||
MALLOC_MAKE_TYPE(M_NFSSVC, "NFS srvsock", "Nfs server structure");
|
||||
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_IPMOPTS, "ip_moptions", "internet multicast options");
|
||||
MALLOC_MAKE_TYPE(M_IPMADDR, "in_multi", "internet multicast address");
|
||||
MALLOC_MAKE_TYPE(M_IFMADDR, "ether_multi", "link-level multicast address");
|
||||
MALLOC_MAKE_TYPE(M_MRTABLE, "mrt", "multicast routing tables");
|
||||
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_MSDOSFSNODE, "MSDOSFS node", "MSDOSFS vnode private part");
|
||||
MALLOC_MAKE_TYPE(M_MSDOSFSFAT, "MSDOSFS FAT", "MSDOSFS file allocation table");
|
||||
MALLOC_MAKE_TYPE(M_DEVFSMNT, "DEVFS mount", "DEVFS mount structure");
|
||||
MALLOC_MAKE_TYPE(M_DEVFSBACK, "DEVFS back", "DEVFS Back node");
|
||||
MALLOC_MAKE_TYPE(M_DEVFSNODE, "DEVFS node", "DEVFS node");
|
||||
MALLOC_MAKE_TYPE(M_TEMP, "temp", "misc temporary data buffers");
|
||||
MALLOC_MAKE_TYPE(M_TTYS, "ttys", "tty data structures");
|
||||
MALLOC_MAKE_TYPE(M_GZIP, "Gzip trees", "Gzip trees");
|
||||
MALLOC_MAKE_TYPE(M_IPFW, "IpFw/IpAcct", "IpFw/IpAcct chain's");
|
||||
MALLOC_MAKE_TYPE(M_DEVL, "isa_devlist", "isa_device lists in userconfig()");
|
||||
MALLOC_MAKE_TYPE(M_SYSCTL, "sysctl", "sysctl internal magic");
|
||||
MALLOC_MAKE_TYPE(M_SECA, "key mgmt", "security associations, key management");
|
||||
MALLOC_MAKE_TYPE(M_BIOBUF, "BIO buffer", "BIO buffer");
|
||||
MALLOC_MAKE_TYPE(M_KTRACE, "KTRACE", "KTRACE");
|
||||
MALLOC_MAKE_TYPE(M_SELECT, "select", "select() buffer");
|
||||
MALLOC_MAKE_TYPE(M_AIO, "AIO", "AIO structure(s)");
|
||||
MALLOC_MAKE_TYPE(M_ZONE, "ZONE", "Zone header");
|
||||
MALLOC_MAKE_TYPE(M_HOSTCACHE, "hostcache", "per-host information cache structure");
|
||||
|
||||
/*
|
||||
@ -172,9 +145,6 @@ struct kmembuckets {
|
||||
|
||||
#ifdef KERNEL
|
||||
|
||||
#include <vm/vm_zone.h>
|
||||
|
||||
|
||||
#include <vm/vm_zone.h>
|
||||
|
||||
#define MINALLOCSIZE (1 << MINBUCKET)
|
||||
|
@ -31,7 +31,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)ffs_vfsops.c 8.31 (Berkeley) 5/20/95
|
||||
* $Id: ffs_vfsops.c,v 1.56 1997/09/27 13:40:08 kato Exp $
|
||||
* $Id: ffs_vfsops.c,v 1.57 1997/10/10 18:16:59 phk Exp $
|
||||
*/
|
||||
|
||||
#include "opt_quota.h"
|
||||
@ -64,6 +64,8 @@
|
||||
#include <vm/vm_page.h>
|
||||
#include <vm/vm_extern.h>
|
||||
|
||||
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 *));
|
||||
static int ffs_oldfscompat __P((struct fs *));
|
||||
|
@ -31,7 +31,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)mfs_vfsops.c 8.11 (Berkeley) 6/19/95
|
||||
* $Id: mfs_vfsops.c,v 1.33 1997/09/21 22:10:01 gibbs Exp $
|
||||
* $Id: mfs_vfsops.c,v 1.34 1997/10/10 18:17:42 phk Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -61,6 +61,8 @@
|
||||
# include <i386/i386/cons.h> /* console IO */
|
||||
#endif
|
||||
|
||||
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));
|
||||
|
||||
|
@ -34,7 +34,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)ufs_quota.c 8.5 (Berkeley) 5/20/95
|
||||
* $Id: ufs_quota.c,v 1.13 1997/03/23 03:37:48 bde Exp $
|
||||
* $Id: ufs_quota.c,v 1.14 1997/08/02 14:33:24 bde Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -51,6 +51,8 @@
|
||||
#include <ufs/ufs/inode.h>
|
||||
#include <ufs/ufs/ufsmount.h>
|
||||
|
||||
MALLOC_DEFINE(M_DQUOT, "UFS quota", "UFS quota entries");
|
||||
|
||||
/*
|
||||
* Quota name to error message mapping.
|
||||
*/
|
||||
|
@ -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.90 1997/09/12 15:58:47 jlemon Exp $
|
||||
* $Id: vm_map.c,v 1.91 1997/09/21 04:24:20 dyson Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -93,6 +93,8 @@
|
||||
#include <vm/default_pager.h>
|
||||
#include <vm/vm_zone.h>
|
||||
|
||||
MALLOC_DEFINE(M_VMMAP, "VM map", "VM map structures");
|
||||
|
||||
/*
|
||||
* Virtual memory maps provide for the mapping, protection,
|
||||
* and sharing of virtual memory objects. In addition,
|
||||
|
@ -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.7 1997/09/21 04:24:26 dyson Exp $
|
||||
* $Id: vm_zone.c,v 1.8 1997/09/21 11:41:12 peter Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -35,6 +35,8 @@
|
||||
#include <vm/vm_extern.h>
|
||||
#include <vm/vm_zone.h>
|
||||
|
||||
MALLOC_DEFINE(M_ZONE, "ZONE", "Zone header");
|
||||
|
||||
/*
|
||||
* This file comprises a very simple zone allocator. This is used
|
||||
* in lieu of the malloc allocator, where needed or more optimal.
|
||||
|
Loading…
Reference in New Issue
Block a user