Staticize some malloc M_ instances.
This commit is contained in:
parent
cc3f51b537
commit
959b7375ed
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=69774
@ -73,9 +73,9 @@
|
||||
#include <sys/rtprio.h>
|
||||
|
||||
#ifdef PC98
|
||||
MALLOC_DEFINE(M_BUSSPACEHANDLE, "busspacehandle", "Bus space handle");
|
||||
static MALLOC_DEFINE(M_BUSSPACEHANDLE, "busspacehandle", "Bus space handle");
|
||||
#endif
|
||||
MALLOC_DEFINE(M_NEXUSDEV, "nexusdev", "Nexus device");
|
||||
static MALLOC_DEFINE(M_NEXUSDEV, "nexusdev", "Nexus device");
|
||||
struct nexus_device {
|
||||
struct resource_list nx_resources;
|
||||
int nx_pcibus;
|
||||
|
@ -73,9 +73,9 @@
|
||||
#include <sys/rtprio.h>
|
||||
|
||||
#ifdef PC98
|
||||
MALLOC_DEFINE(M_BUSSPACEHANDLE, "busspacehandle", "Bus space handle");
|
||||
static MALLOC_DEFINE(M_BUSSPACEHANDLE, "busspacehandle", "Bus space handle");
|
||||
#endif
|
||||
MALLOC_DEFINE(M_NEXUSDEV, "nexusdev", "Nexus device");
|
||||
static MALLOC_DEFINE(M_NEXUSDEV, "nexusdev", "Nexus device");
|
||||
struct nexus_device {
|
||||
struct resource_list nx_resources;
|
||||
int nx_pcibus;
|
||||
|
@ -239,3 +239,5 @@ device uscanner # Scanners
|
||||
device aue # ADMtek USB ethernet
|
||||
device cue # CATC USB ethernet
|
||||
device kue # Kawasaki LSI USB ethernet
|
||||
|
||||
options DDB
|
||||
|
@ -33,7 +33,7 @@
|
||||
|
||||
#include <contrib/dev/fla/msysosak.h>
|
||||
|
||||
MALLOC_DEFINE(M_FLA, "fla driver", "fla driver storage");
|
||||
static MALLOC_DEFINE(M_FLA, "fla driver", "fla driver storage");
|
||||
|
||||
static int fla_debug = 0;
|
||||
SYSCTL_INT(_debug, OID_AUTO, fladebug, CTLFLAG_RW, &fla_debug, 0, "");
|
||||
|
@ -58,7 +58,7 @@
|
||||
|
||||
MODULE_VERSION(agp, 1);
|
||||
|
||||
MALLOC_DEFINE(M_AGP, "agp", "AGP data structures");
|
||||
static MALLOC_DEFINE(M_AGP, "agp", "AGP data structures");
|
||||
|
||||
#define CDEV_MAJOR 148
|
||||
/* agp_drv.c */
|
||||
|
@ -96,7 +96,7 @@ static devclass_t ata_devclass;
|
||||
static devclass_t ata_pci_devclass;
|
||||
static struct intr_config_hook *ata_delayed_attach = NULL;
|
||||
static char ata_conf[256];
|
||||
MALLOC_DEFINE(M_ATA, "ATA generic", "ATA driver generic layer");
|
||||
static MALLOC_DEFINE(M_ATA, "ATA generic", "ATA driver generic layer");
|
||||
|
||||
#if NISA > 0
|
||||
static struct isa_pnp_id ata_ids[] = {
|
||||
|
@ -80,7 +80,7 @@ static int ad_version(u_int16_t);
|
||||
|
||||
/* internal vars */
|
||||
static u_int32_t adp_lun_map = 0;
|
||||
MALLOC_DEFINE(M_AD, "AD driver", "ATA disk driver");
|
||||
static MALLOC_DEFINE(M_AD, "AD driver", "ATA disk driver");
|
||||
|
||||
/* defines */
|
||||
#define AD_MAX_RETRIES 3
|
||||
|
@ -76,7 +76,7 @@ static int ar_read(struct ad_softc *, u_int32_t, int, char *);
|
||||
/* internal vars */
|
||||
static int ar_init = 0;
|
||||
static struct ar_softc *ar_table[8];
|
||||
MALLOC_DEFINE(M_AR, "AR driver", "ATA RAID driver");
|
||||
static MALLOC_DEFINE(M_AR, "AR driver", "ATA RAID driver");
|
||||
|
||||
/* defines */
|
||||
#define PRINT_AD(adp) \
|
||||
|
@ -51,7 +51,7 @@ static char *atapi_cmd2str(u_int8_t);
|
||||
static char *atapi_skey2str(u_int8_t);
|
||||
|
||||
/* internal vars */
|
||||
MALLOC_DEFINE(M_ATAPI, "ATAPI generic", "ATAPI driver generic layer");
|
||||
static MALLOC_DEFINE(M_ATAPI, "ATAPI generic", "ATAPI driver generic layer");
|
||||
|
||||
/* defines */
|
||||
#define ATAPI_MAX_RETRIES 3
|
||||
|
@ -98,7 +98,7 @@ static int acd_set_speed(struct acd_softc *cdp, int);
|
||||
|
||||
/* internal vars */
|
||||
static u_int32_t acd_lun_map = 0;
|
||||
MALLOC_DEFINE(M_ACD, "ACD driver", "ATAPI CD driver buffers");
|
||||
static MALLOC_DEFINE(M_ACD, "ACD driver", "ATAPI CD driver buffers");
|
||||
|
||||
int
|
||||
acdattach(struct atapi_softc *atp)
|
||||
|
@ -76,7 +76,7 @@ static int afd_prevent_allow(struct afd_softc *, int);
|
||||
|
||||
/* internal vars */
|
||||
static u_int32_t afd_lun_map = 0;
|
||||
MALLOC_DEFINE(M_AFD, "AFD driver", "ATAPI floppy driver buffers");
|
||||
static MALLOC_DEFINE(M_AFD, "AFD driver", "ATAPI floppy driver buffers");
|
||||
|
||||
int
|
||||
afdattach(struct atapi_softc *atp)
|
||||
|
@ -82,7 +82,7 @@ static int ast_erase(struct ast_softc *);
|
||||
/* internal vars */
|
||||
static u_int32_t ast_lun_map = 0;
|
||||
static u_int64_t ast_total = 0;
|
||||
MALLOC_DEFINE(M_AST, "AST driver", "ATAPI tape driver buffers");
|
||||
static MALLOC_DEFINE(M_AST, "AST driver", "ATAPI tape driver buffers");
|
||||
|
||||
int
|
||||
astattach(struct atapi_softc *atp)
|
||||
|
@ -43,7 +43,7 @@
|
||||
#include <isa/isareg.h>
|
||||
#include <isa/isavar.h>
|
||||
|
||||
MALLOC_DEFINE(M_ATKBDDEV, "atkbddev", "AT Keyboard device");
|
||||
static MALLOC_DEFINE(M_ATKBDDEV, "atkbddev", "AT Keyboard device");
|
||||
|
||||
/* children */
|
||||
typedef struct atkbdc_device {
|
||||
|
@ -43,7 +43,7 @@
|
||||
#include <isa/isareg.h>
|
||||
#include <isa/isavar.h>
|
||||
|
||||
MALLOC_DEFINE(M_ATKBDDEV, "atkbddev", "AT Keyboard device");
|
||||
static MALLOC_DEFINE(M_ATKBDDEV, "atkbddev", "AT Keyboard device");
|
||||
|
||||
/* children */
|
||||
typedef struct atkbdc_device {
|
||||
|
@ -42,7 +42,7 @@
|
||||
|
||||
#define DEVTOSOFTC(dev) ((struct ppb_data *)device_get_softc(dev))
|
||||
|
||||
MALLOC_DEFINE(M_PPBUSDEV, "ppbusdev", "Parallel Port bus device");
|
||||
static MALLOC_DEFINE(M_PPBUSDEV, "ppbusdev", "Parallel Port bus device");
|
||||
|
||||
|
||||
/*
|
||||
|
@ -61,7 +61,7 @@ static struct cdevsw snp_cdevsw = {
|
||||
#define MIN(a,b) (((a)<(b))?(a):(b))
|
||||
#endif
|
||||
|
||||
MALLOC_DEFINE(M_SNP, "snp", "Snoop device data");
|
||||
static MALLOC_DEFINE(M_SNP, "snp", "Snoop device data");
|
||||
|
||||
static struct tty *snpdevtotty __P((dev_t dev));
|
||||
static int snp_detach __P((struct snoop *snp));
|
||||
|
@ -45,7 +45,7 @@ static struct cdevsw spkr_cdevsw = {
|
||||
/* bmaj */ -1
|
||||
};
|
||||
|
||||
MALLOC_DEFINE(M_SPKR, "spkr", "Speaker buffer");
|
||||
static MALLOC_DEFINE(M_SPKR, "spkr", "Speaker buffer");
|
||||
|
||||
/**************** MACHINE DEPENDENT PART STARTS HERE *************************
|
||||
*
|
||||
|
@ -239,3 +239,5 @@ device uscanner # Scanners
|
||||
device aue # ADMtek USB ethernet
|
||||
device cue # CATC USB ethernet
|
||||
device kue # Kawasaki LSI USB ethernet
|
||||
|
||||
options DDB
|
||||
|
@ -73,9 +73,9 @@
|
||||
#include <sys/rtprio.h>
|
||||
|
||||
#ifdef PC98
|
||||
MALLOC_DEFINE(M_BUSSPACEHANDLE, "busspacehandle", "Bus space handle");
|
||||
static MALLOC_DEFINE(M_BUSSPACEHANDLE, "busspacehandle", "Bus space handle");
|
||||
#endif
|
||||
MALLOC_DEFINE(M_NEXUSDEV, "nexusdev", "Nexus device");
|
||||
static MALLOC_DEFINE(M_NEXUSDEV, "nexusdev", "Nexus device");
|
||||
struct nexus_device {
|
||||
struct resource_list nx_resources;
|
||||
int nx_pcibus;
|
||||
|
@ -73,9 +73,9 @@
|
||||
#include <sys/rtprio.h>
|
||||
|
||||
#ifdef PC98
|
||||
MALLOC_DEFINE(M_BUSSPACEHANDLE, "busspacehandle", "Bus space handle");
|
||||
static MALLOC_DEFINE(M_BUSSPACEHANDLE, "busspacehandle", "Bus space handle");
|
||||
#endif
|
||||
MALLOC_DEFINE(M_NEXUSDEV, "nexusdev", "Nexus device");
|
||||
static MALLOC_DEFINE(M_NEXUSDEV, "nexusdev", "Nexus device");
|
||||
struct nexus_device {
|
||||
struct resource_list nx_resources;
|
||||
int nx_pcibus;
|
||||
|
@ -45,7 +45,7 @@ static struct cdevsw spkr_cdevsw = {
|
||||
/* bmaj */ -1
|
||||
};
|
||||
|
||||
MALLOC_DEFINE(M_SPKR, "spkr", "Speaker buffer");
|
||||
static MALLOC_DEFINE(M_SPKR, "spkr", "Speaker buffer");
|
||||
|
||||
/**************** MACHINE DEPENDENT PART STARTS HERE *************************
|
||||
*
|
||||
|
@ -43,7 +43,7 @@
|
||||
#include <isa/isareg.h>
|
||||
#include <isa/isavar.h>
|
||||
|
||||
MALLOC_DEFINE(M_ATKBDDEV, "atkbddev", "AT Keyboard device");
|
||||
static MALLOC_DEFINE(M_ATKBDDEV, "atkbddev", "AT Keyboard device");
|
||||
|
||||
/* children */
|
||||
typedef struct atkbdc_device {
|
||||
|
@ -78,7 +78,7 @@
|
||||
|
||||
static int isa_print_child(device_t bus, device_t dev);
|
||||
|
||||
MALLOC_DEFINE(M_ISADEV, "isadev", "ISA device");
|
||||
static MALLOC_DEFINE(M_ISADEV, "isadev", "ISA device");
|
||||
|
||||
static devclass_t isa_devclass;
|
||||
static int isa_running;
|
||||
|
@ -46,7 +46,7 @@
|
||||
#include <sys/stat.h>
|
||||
#include <sys/acl.h>
|
||||
|
||||
MALLOC_DEFINE(M_ACL, "acl", "access control list");
|
||||
static MALLOC_DEFINE(M_ACL, "acl", "access control list");
|
||||
|
||||
static int vacl_set_acl(struct proc *p, struct vnode *vp, acl_type_t type,
|
||||
struct acl *aclp);
|
||||
|
@ -49,7 +49,7 @@
|
||||
|
||||
struct cdevsw *cdevsw[NUMCDEVSW];
|
||||
|
||||
MALLOC_DEFINE(M_DEVT, "dev_t", "dev_t storage");
|
||||
static MALLOC_DEFINE(M_DEVT, "dev_t", "dev_t storage");
|
||||
|
||||
/*
|
||||
* This is the number of hash-buckets. Experiements with 'real-life'
|
||||
|
@ -37,7 +37,7 @@
|
||||
#include <sys/linker.h>
|
||||
#include <sys/proc.h>
|
||||
|
||||
MALLOC_DEFINE(M_MODULE, "module", "module data structures");
|
||||
static MALLOC_DEFINE(M_MODULE, "module", "module data structures");
|
||||
|
||||
typedef TAILQ_HEAD(, module) modulelist_t;
|
||||
struct module {
|
||||
|
@ -46,7 +46,7 @@
|
||||
#include <sys/stat.h>
|
||||
#include <sys/acl.h>
|
||||
|
||||
MALLOC_DEFINE(M_ACL, "acl", "access control list");
|
||||
static MALLOC_DEFINE(M_ACL, "acl", "access control list");
|
||||
|
||||
static int vacl_set_acl(struct proc *p, struct vnode *vp, acl_type_t type,
|
||||
struct acl *aclp);
|
||||
|
@ -41,7 +41,7 @@
|
||||
#include <sys/rman.h>
|
||||
#include <machine/stdarg.h> /* for device_printf() */
|
||||
|
||||
MALLOC_DEFINE(M_BUS, "bus", "Bus data structures");
|
||||
static MALLOC_DEFINE(M_BUS, "bus", "Bus data structures");
|
||||
|
||||
#ifdef BUS_DEBUG
|
||||
|
||||
|
@ -22,7 +22,7 @@
|
||||
#include <machine/md_var.h>
|
||||
#include <sys/ctype.h>
|
||||
|
||||
MALLOC_DEFINE(M_DISK, "disk", "disk data");
|
||||
static MALLOC_DEFINE(M_DISK, "disk", "disk data");
|
||||
|
||||
static d_strategy_t diskstrategy;
|
||||
static d_open_t diskopen;
|
||||
|
@ -32,7 +32,7 @@
|
||||
#include <sys/systm.h>
|
||||
#include <sys/eventhandler.h>
|
||||
|
||||
MALLOC_DEFINE(M_EVENTHANDLER, "eventhandler", "Event handler records");
|
||||
static MALLOC_DEFINE(M_EVENTHANDLER, "eventhandler", "Event handler records");
|
||||
|
||||
/* List of 'slow' lists */
|
||||
static TAILQ_HEAD(, eventhandler_list) eventhandler_lists;
|
||||
|
@ -36,7 +36,7 @@
|
||||
#include <sys/ipl.h>
|
||||
#include <sys/malloc.h>
|
||||
|
||||
MALLOC_DEFINE(M_TASKQUEUE, "taskqueue", "Task Queues");
|
||||
static MALLOC_DEFINE(M_TASKQUEUE, "taskqueue", "Task Queues");
|
||||
|
||||
static STAILQ_HEAD(taskqueue_list, taskqueue) taskqueue_queues;
|
||||
|
||||
|
@ -54,7 +54,7 @@
|
||||
#include <sys/signalvar.h>
|
||||
#include <sys/malloc.h>
|
||||
|
||||
MALLOC_DEFINE(M_PTY, "ptys", "pty data structures");
|
||||
static MALLOC_DEFINE(M_PTY, "ptys", "pty data structures");
|
||||
|
||||
static void ptsstart __P((struct tty *tp));
|
||||
static void ptsstop __P((struct tty *tp, int rw));
|
||||
|
@ -61,7 +61,7 @@ static struct cdevsw snp_cdevsw = {
|
||||
#define MIN(a,b) (((a)<(b))?(a):(b))
|
||||
#endif
|
||||
|
||||
MALLOC_DEFINE(M_SNP, "snp", "Snoop device data");
|
||||
static MALLOC_DEFINE(M_SNP, "snp", "Snoop device data");
|
||||
|
||||
static struct tty *snpdevtotty __P((dev_t dev));
|
||||
static int snp_detach __P((struct snoop *snp));
|
||||
|
@ -46,7 +46,7 @@
|
||||
#include <sys/stat.h>
|
||||
#include <sys/acl.h>
|
||||
|
||||
MALLOC_DEFINE(M_ACL, "acl", "access control list");
|
||||
static MALLOC_DEFINE(M_ACL, "acl", "access control list");
|
||||
|
||||
static int vacl_set_acl(struct proc *p, struct vnode *vp, acl_type_t type,
|
||||
struct acl *aclp);
|
||||
|
@ -130,7 +130,7 @@ SYSCTL_OPAQUE(_vfs_cache, OID_AUTO, nchstats, CTLFLAG_RD, &nchstats,
|
||||
|
||||
static void cache_zap __P((struct namecache *ncp));
|
||||
|
||||
MALLOC_DEFINE(M_VFSCACHE, "vfscache", "VFS name cache entries");
|
||||
static MALLOC_DEFINE(M_VFSCACHE, "vfscache", "VFS name cache entries");
|
||||
|
||||
/*
|
||||
* Flags in namecache.nc_flag
|
||||
|
@ -78,7 +78,7 @@
|
||||
#include <sys/kernel.h>
|
||||
#include <sys/sysctl.h>
|
||||
|
||||
MALLOC_DEFINE(M_BPF, "BPF", "BPF data");
|
||||
static MALLOC_DEFINE(M_BPF, "BPF", "BPF data");
|
||||
|
||||
#if NBPF > 0
|
||||
|
||||
|
@ -93,7 +93,7 @@
|
||||
|
||||
#include <sys/kernel.h>
|
||||
#include <sys/malloc.h>
|
||||
MALLOC_DEFINE(M_NETADDR, "Export Host", "Export host address structure");
|
||||
static MALLOC_DEFINE(M_NETADDR, "Export Host", "Export host address structure");
|
||||
|
||||
static void encap_add __P((struct encaptab *));
|
||||
static int mask_match __P((const struct encaptab *, const struct sockaddr *,
|
||||
|
@ -71,7 +71,7 @@ u_int frag6_nfragpackets;
|
||||
struct ip6q ip6q; /* ip6 reassemble queue */
|
||||
|
||||
/* FreeBSD tweak */
|
||||
MALLOC_DEFINE(M_FTABLE, "fragment", "fragment reassembly header");
|
||||
static MALLOC_DEFINE(M_FTABLE, "fragment", "fragment reassembly header");
|
||||
|
||||
/*
|
||||
* Initialise reassembly queue and fragment identifier.
|
||||
|
@ -54,7 +54,7 @@ static struct cdevsw spkr_cdevsw = {
|
||||
/* bmaj */ -1
|
||||
};
|
||||
|
||||
MALLOC_DEFINE(M_SPKR, "spkr", "Speaker buffer");
|
||||
static MALLOC_DEFINE(M_SPKR, "spkr", "Speaker buffer");
|
||||
|
||||
/**************** MACHINE DEPENDENT PART STARTS HERE *************************
|
||||
*
|
||||
|
@ -58,7 +58,7 @@
|
||||
|
||||
MODULE_VERSION(agp, 1);
|
||||
|
||||
MALLOC_DEFINE(M_AGP, "agp", "AGP data structures");
|
||||
static MALLOC_DEFINE(M_AGP, "agp", "AGP data structures");
|
||||
|
||||
#define CDEV_MAJOR 148
|
||||
/* agp_drv.c */
|
||||
|
@ -77,19 +77,19 @@
|
||||
/*
|
||||
* malloc types defined for the softdep system.
|
||||
*/
|
||||
MALLOC_DEFINE(M_PAGEDEP, "pagedep","File page dependencies");
|
||||
MALLOC_DEFINE(M_INODEDEP, "inodedep","Inode dependencies");
|
||||
MALLOC_DEFINE(M_NEWBLK, "newblk","New block allocation");
|
||||
MALLOC_DEFINE(M_BMSAFEMAP, "bmsafemap","Block or frag allocated from cyl group map");
|
||||
MALLOC_DEFINE(M_ALLOCDIRECT, "allocdirect","Block or frag dependency for an inode");
|
||||
MALLOC_DEFINE(M_INDIRDEP, "indirdep","Indirect block dependencies");
|
||||
MALLOC_DEFINE(M_ALLOCINDIR, "allocindir","Block dependency for an indirect block");
|
||||
MALLOC_DEFINE(M_FREEFRAG, "freefrag","Previously used frag for an inode");
|
||||
MALLOC_DEFINE(M_FREEBLKS, "freeblks","Blocks freed from an inode");
|
||||
MALLOC_DEFINE(M_FREEFILE, "freefile","Inode deallocated");
|
||||
MALLOC_DEFINE(M_DIRADD, "diradd","New directory entry");
|
||||
MALLOC_DEFINE(M_MKDIR, "mkdir","New directory");
|
||||
MALLOC_DEFINE(M_DIRREM, "dirrem","Directory entry deleted");
|
||||
static MALLOC_DEFINE(M_PAGEDEP, "pagedep","File page dependencies");
|
||||
static MALLOC_DEFINE(M_INODEDEP, "inodedep","Inode dependencies");
|
||||
static MALLOC_DEFINE(M_NEWBLK, "newblk","New block allocation");
|
||||
static MALLOC_DEFINE(M_BMSAFEMAP, "bmsafemap","Block or frag allocated from cyl group map");
|
||||
static MALLOC_DEFINE(M_ALLOCDIRECT, "allocdirect","Block or frag dependency for an inode");
|
||||
static MALLOC_DEFINE(M_INDIRDEP, "indirdep","Indirect block dependencies");
|
||||
static MALLOC_DEFINE(M_ALLOCINDIR, "allocindir","Block dependency for an indirect block");
|
||||
static MALLOC_DEFINE(M_FREEFRAG, "freefrag","Previously used frag for an inode");
|
||||
static MALLOC_DEFINE(M_FREEBLKS, "freeblks","Blocks freed from an inode");
|
||||
static MALLOC_DEFINE(M_FREEFILE, "freefile","Inode deallocated");
|
||||
static MALLOC_DEFINE(M_DIRADD, "diradd","New directory entry");
|
||||
static MALLOC_DEFINE(M_MKDIR, "mkdir","New directory");
|
||||
static MALLOC_DEFINE(M_DIRREM, "dirrem","Directory entry deleted");
|
||||
|
||||
#define M_SOFTDEP_FLAGS (M_WAITOK | M_USE_RESERVE)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user