Make a bunch of malloc types static.
Found by: src/tools/tools/kernxref
This commit is contained in:
parent
d67c43b3a9
commit
c711aea6ca
@ -42,7 +42,7 @@ static struct sx led_sx;
|
|||||||
static LIST_HEAD(, ledsc) led_list = LIST_HEAD_INITIALIZER(&led_list);
|
static LIST_HEAD(, ledsc) led_list = LIST_HEAD_INITIALIZER(&led_list);
|
||||||
static struct callout led_ch;
|
static struct callout led_ch;
|
||||||
|
|
||||||
MALLOC_DEFINE(M_LED, "LED", "LED driver");
|
static MALLOC_DEFINE(M_LED, "LED", "LED driver");
|
||||||
|
|
||||||
static void
|
static void
|
||||||
led_timeout(void *p)
|
led_timeout(void *p)
|
||||||
|
@ -275,6 +275,7 @@ __FBSDID("$FreeBSD$");
|
|||||||
#include <dev/ray/if_raydbg.h>
|
#include <dev/ray/if_raydbg.h>
|
||||||
#include <dev/ray/if_rayvar.h>
|
#include <dev/ray/if_rayvar.h>
|
||||||
|
|
||||||
|
static MALLOC_DEFINE(M_RAYCOM, "raycom", "Raylink command queue entry");
|
||||||
/*
|
/*
|
||||||
* Prototyping
|
* Prototyping
|
||||||
*/
|
*/
|
||||||
|
@ -111,8 +111,6 @@ struct ray_softc {
|
|||||||
* Command queue definitions
|
* Command queue definitions
|
||||||
*/
|
*/
|
||||||
typedef void (*ray_comqfn_t)(struct ray_softc *sc, struct ray_comq_entry *com);
|
typedef void (*ray_comqfn_t)(struct ray_softc *sc, struct ray_comq_entry *com);
|
||||||
MALLOC_DECLARE(M_RAYCOM);
|
|
||||||
MALLOC_DEFINE(M_RAYCOM, "raycom", "Raylink command queue entry");
|
|
||||||
struct ray_comq_entry {
|
struct ray_comq_entry {
|
||||||
TAILQ_ENTRY(ray_comq_entry) c_chain; /* Tail queue. */
|
TAILQ_ENTRY(ray_comq_entry) c_chain; /* Tail queue. */
|
||||||
ray_comqfn_t c_function; /* Function to call */
|
ray_comqfn_t c_function; /* Function to call */
|
||||||
|
@ -42,7 +42,7 @@
|
|||||||
|
|
||||||
#include <fs/hpfs/hpfs.h>
|
#include <fs/hpfs/hpfs.h>
|
||||||
|
|
||||||
MALLOC_DEFINE(M_HPFSHASH, "HPFS hash", "HPFS node hash tables");
|
static MALLOC_DEFINE(M_HPFSHASH, "HPFS hash", "HPFS node hash tables");
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Structures associated with hpfsnode cacheing.
|
* Structures associated with hpfsnode cacheing.
|
||||||
|
@ -99,7 +99,7 @@
|
|||||||
#include <fs/udf/udf.h>
|
#include <fs/udf/udf.h>
|
||||||
#include <fs/udf/udf_mount.h>
|
#include <fs/udf/udf_mount.h>
|
||||||
|
|
||||||
MALLOC_DEFINE(M_UDFMOUNT, "UDF mount", "UDF mount structure");
|
static MALLOC_DEFINE(M_UDFMOUNT, "UDF mount", "UDF mount structure");
|
||||||
MALLOC_DEFINE(M_UDFFENTRY, "UDF fentry", "UDF file entry structure");
|
MALLOC_DEFINE(M_UDFFENTRY, "UDF fentry", "UDF file entry structure");
|
||||||
|
|
||||||
struct iconv_functions *udf_iconv = NULL;
|
struct iconv_functions *udf_iconv = NULL;
|
||||||
|
@ -65,7 +65,7 @@ __FBSDID("$FreeBSD$");
|
|||||||
|
|
||||||
#define TODO printf("%s: not implemented!\n", __func__)
|
#define TODO printf("%s: not implemented!\n", __func__)
|
||||||
|
|
||||||
MALLOC_DEFINE(M_IOAPIC, "I/O APIC", "I/O APIC structures");
|
static MALLOC_DEFINE(M_IOAPIC, "I/O APIC", "I/O APIC structures");
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* New interrupt support code..
|
* New interrupt support code..
|
||||||
|
@ -147,7 +147,7 @@ static bus_datum *busses;
|
|||||||
static int mptable_nioapics, mptable_nbusses, mptable_maxbusid;
|
static int mptable_nioapics, mptable_nbusses, mptable_maxbusid;
|
||||||
static int pci0 = -1;
|
static int pci0 = -1;
|
||||||
|
|
||||||
MALLOC_DEFINE(M_MPTABLE, "MP Table", "MP Table Items");
|
static MALLOC_DEFINE(M_MPTABLE, "MP Table", "MP Table Items");
|
||||||
|
|
||||||
static enum intr_polarity conforming_polarity(u_char src_bus,
|
static enum intr_polarity conforming_polarity(u_char src_bus,
|
||||||
u_char src_bus_irq);
|
u_char src_bus_irq);
|
||||||
|
@ -99,7 +99,7 @@ static uint8_t pci_pir_search_irq(int bus, int device, int pin);
|
|||||||
static int pci_pir_valid_irq(struct pci_link *pci_link, int irq);
|
static int pci_pir_valid_irq(struct pci_link *pci_link, int irq);
|
||||||
static void pci_pir_walk_table(pir_entry_handler *handler, void *arg);
|
static void pci_pir_walk_table(pir_entry_handler *handler, void *arg);
|
||||||
|
|
||||||
MALLOC_DEFINE(M_PIR, "$PIR", "$PIR structures");
|
static MALLOC_DEFINE(M_PIR, "$PIR", "$PIR structures");
|
||||||
|
|
||||||
static struct PIR_table *pci_route_table;
|
static struct PIR_table *pci_route_table;
|
||||||
static device_t pir_device;
|
static device_t pir_device;
|
||||||
|
@ -55,7 +55,7 @@ __FBSDID("$FreeBSD$");
|
|||||||
#include <sys/libkern.h>
|
#include <sys/libkern.h>
|
||||||
#include <sys/kenv.h>
|
#include <sys/kenv.h>
|
||||||
|
|
||||||
MALLOC_DEFINE(M_KENV, "kenv", "kernel environment");
|
static MALLOC_DEFINE(M_KENV, "kenv", "kernel environment");
|
||||||
|
|
||||||
#define KENV_SIZE 512 /* Maximum number of environment strings */
|
#define KENV_SIZE 512 /* Maximum number of environment strings */
|
||||||
|
|
||||||
|
@ -59,7 +59,8 @@ __FBSDID("$FreeBSD$");
|
|||||||
|
|
||||||
#include <vm/uma.h>
|
#include <vm/uma.h>
|
||||||
|
|
||||||
MALLOC_DEFINE(M_KQUEUE, "kqueue", "memory for kqueue system");
|
static MALLOC_DEFINE(M_KQUEUE, "kqueue", "memory for kqueue system");
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This lock is used if multiple kq locks are required. This possibly
|
* This lock is used if multiple kq locks are required. This possibly
|
||||||
* should be made into a per proc lock.
|
* should be made into a per proc lock.
|
||||||
|
@ -56,7 +56,7 @@ __FBSDID("$FreeBSD$");
|
|||||||
#include <sys/systm.h>
|
#include <sys/systm.h>
|
||||||
|
|
||||||
|
|
||||||
MALLOC_DEFINE(M_MTXPOOL, "mtx_pool", "mutex pool");
|
static MALLOC_DEFINE(M_MTXPOOL, "mtx_pool", "mutex pool");
|
||||||
|
|
||||||
/* Pool sizes must be a power of two */
|
/* Pool sizes must be a power of two */
|
||||||
#ifndef MTX_POOL_LOCKBUILDER_SIZE
|
#ifndef MTX_POOL_LOCKBUILDER_SIZE
|
||||||
|
@ -49,7 +49,7 @@ __FBSDID("$FreeBSD$");
|
|||||||
#include <sys/sbuf.h>
|
#include <sys/sbuf.h>
|
||||||
|
|
||||||
#ifdef _KERNEL
|
#ifdef _KERNEL
|
||||||
MALLOC_DEFINE(M_SBUF, "sbuf", "string buffers");
|
static MALLOC_DEFINE(M_SBUF, "sbuf", "string buffers");
|
||||||
#define SBMALLOC(size) malloc(size, M_SBUF, M_WAITOK)
|
#define SBMALLOC(size) malloc(size, M_SBUF, M_WAITOK)
|
||||||
#define SBFREE(buf) free(buf, M_SBUF)
|
#define SBFREE(buf) free(buf, M_SBUF)
|
||||||
#else /* _KERNEL */
|
#else /* _KERNEL */
|
||||||
|
@ -138,7 +138,7 @@ SYSCTL_UINT(_debug_sleepq, OID_AUTO, max_depth, CTLFLAG_RD, &sleepq_max_depth,
|
|||||||
#endif
|
#endif
|
||||||
static struct sleepqueue_chain sleepq_chains[SC_TABLESIZE];
|
static struct sleepqueue_chain sleepq_chains[SC_TABLESIZE];
|
||||||
|
|
||||||
MALLOC_DEFINE(M_SLEEPQUEUE, "sleep queues", "sleep queues");
|
static MALLOC_DEFINE(M_SLEEPQUEUE, "sleep queues", "sleep queues");
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Prototypes for non-exported routines.
|
* Prototypes for non-exported routines.
|
||||||
|
@ -136,7 +136,7 @@ SYSCTL_UINT(_debug_turnstile, OID_AUTO, max_depth, CTLFLAG_RD,
|
|||||||
static struct mtx td_contested_lock;
|
static struct mtx td_contested_lock;
|
||||||
static struct turnstile_chain turnstile_chains[TC_TABLESIZE];
|
static struct turnstile_chain turnstile_chains[TC_TABLESIZE];
|
||||||
|
|
||||||
MALLOC_DEFINE(M_TURNSTILE, "turnstiles", "turnstiles");
|
static MALLOC_DEFINE(M_TURNSTILE, "turnstiles", "turnstiles");
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Prototypes for non-exported routines.
|
* Prototypes for non-exported routines.
|
||||||
|
@ -88,7 +88,7 @@ SYSCTL_INT(_kern_ipc, OID_AUTO, m_defragrandomfailures, CTLFLAG_RW,
|
|||||||
/*
|
/*
|
||||||
* Malloc-type for external ext_buf ref counts.
|
* Malloc-type for external ext_buf ref counts.
|
||||||
*/
|
*/
|
||||||
MALLOC_DEFINE(M_MBUF, "mbextcnt", "mbuf external ref counts");
|
static MALLOC_DEFINE(M_MBUF, "mbextcnt", "mbuf external ref counts");
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Allocate a given length worth of mbufs and/or clusters (whatever fits
|
* Allocate a given length worth of mbufs and/or clusters (whatever fits
|
||||||
|
@ -76,7 +76,7 @@ __FBSDID("$FreeBSD$");
|
|||||||
#include <sys/mbuf.h>
|
#include <sys/mbuf.h>
|
||||||
#include <sys/mutex.h>
|
#include <sys/mutex.h>
|
||||||
|
|
||||||
MALLOC_DEFINE(M_PACKET_TAGS, "mbuf tags", "packet-attached information");
|
static MALLOC_DEFINE(M_PACKET_TAGS, "mbuf tags", "packet-attached information");
|
||||||
|
|
||||||
/* can't call it m_dup(), as freebsd[34] uses m_dup() with different arg */
|
/* can't call it m_dup(), as freebsd[34] uses m_dup() with different arg */
|
||||||
static struct mbuf *m_dup1(struct mbuf *, int, int, int);
|
static struct mbuf *m_dup1(struct mbuf *, int, int, int);
|
||||||
|
@ -100,7 +100,7 @@ LIST_HEAD(, if_clone) if_cloners = LIST_HEAD_INITIALIZER(if_cloners);
|
|||||||
} \
|
} \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
MALLOC_DEFINE(M_CLONE, "clone", "interface cloning framework");
|
static MALLOC_DEFINE(M_CLONE, "clone", "interface cloning framework");
|
||||||
|
|
||||||
void
|
void
|
||||||
if_clone_init(void)
|
if_clone_init(void)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user