diff --git a/sys/kern/kern_hhook.c b/sys/kern/kern_hhook.c index 47867555ad42..1e34044e7e0f 100644 --- a/sys/kern/kern_hhook.c +++ b/sys/kern/kern_hhook.c @@ -58,8 +58,7 @@ struct hhook { STAILQ_ENTRY(hhook) hhk_next; }; -MALLOC_DECLARE(M_HHOOK); -MALLOC_DEFINE(M_HHOOK, "hhook", "Helper hooks are linked off hhook_head lists"); +static MALLOC_DEFINE(M_HHOOK, "hhook", "Helper hooks are linked off hhook_head lists"); LIST_HEAD(hhookheadhead, hhook_head); VNET_DEFINE(struct hhookheadhead, hhook_head_list); diff --git a/sys/netinet/cc/cc_chd.c b/sys/netinet/cc/cc_chd.c index 9152a0b7ec24..5f64f6ca4d8b 100644 --- a/sys/netinet/cc/cc_chd.c +++ b/sys/netinet/cc/cc_chd.c @@ -127,8 +127,7 @@ static VNET_DEFINE(uint32_t, chd_qthresh) = 20; #define V_chd_loss_fair VNET(chd_loss_fair) #define V_chd_use_max VNET(chd_use_max) -MALLOC_DECLARE(M_CHD); -MALLOC_DEFINE(M_CHD, "chd data", +static MALLOC_DEFINE(M_CHD, "chd data", "Per connection data required for the CHD congestion control algorithm"); struct cc_algo chd_cc_algo = { diff --git a/sys/netinet/cc/cc_cubic.c b/sys/netinet/cc/cc_cubic.c index 2c5d82c41aa0..17a69855275c 100644 --- a/sys/netinet/cc/cc_cubic.c +++ b/sys/netinet/cc/cc_cubic.c @@ -98,8 +98,7 @@ struct cubic { int t_last_cong; }; -MALLOC_DECLARE(M_CUBIC); -MALLOC_DEFINE(M_CUBIC, "cubic data", +static MALLOC_DEFINE(M_CUBIC, "cubic data", "Per connection data required for the CUBIC congestion control algorithm"); struct cc_algo cubic_cc_algo = { diff --git a/sys/netinet/cc/cc_htcp.c b/sys/netinet/cc/cc_htcp.c index 4ada9d96f700..15b7973b039f 100644 --- a/sys/netinet/cc/cc_htcp.c +++ b/sys/netinet/cc/cc_htcp.c @@ -173,8 +173,7 @@ static VNET_DEFINE(u_int, htcp_rtt_scaling) = 0; #define V_htcp_adaptive_backoff VNET(htcp_adaptive_backoff) #define V_htcp_rtt_scaling VNET(htcp_rtt_scaling) -MALLOC_DECLARE(M_HTCP); -MALLOC_DEFINE(M_HTCP, "htcp data", +static MALLOC_DEFINE(M_HTCP, "htcp data", "Per connection data required for the HTCP congestion control algorithm"); struct cc_algo htcp_cc_algo = { diff --git a/sys/netinet/cc/cc_vegas.c b/sys/netinet/cc/cc_vegas.c index ac3c89f571a8..d25ecf9e45e9 100644 --- a/sys/netinet/cc/cc_vegas.c +++ b/sys/netinet/cc/cc_vegas.c @@ -105,8 +105,7 @@ static VNET_DEFINE(uint32_t, vegas_beta) = 3; #define V_vegas_alpha VNET(vegas_alpha) #define V_vegas_beta VNET(vegas_beta) -MALLOC_DECLARE(M_VEGAS); -MALLOC_DEFINE(M_VEGAS, "vegas data", +static MALLOC_DEFINE(M_VEGAS, "vegas data", "Per connection data required for the Vegas congestion control algorithm"); struct cc_algo vegas_cc_algo = { diff --git a/sys/netinet/siftr.c b/sys/netinet/siftr.c index 9fca662ee96b..9d1126287035 100644 --- a/sys/netinet/siftr.c +++ b/sys/netinet/siftr.c @@ -156,14 +156,11 @@ __FBSDID("$FreeBSD$"); #define THIRD_OCTET(X) (((X) & 0x0000FF00) >> 8) #define FOURTH_OCTET(X) ((X) & 0x000000FF) -MALLOC_DECLARE(M_SIFTR); -MALLOC_DEFINE(M_SIFTR, "siftr", "dynamic memory used by SIFTR"); - -MALLOC_DECLARE(M_SIFTR_PKTNODE); -MALLOC_DEFINE(M_SIFTR_PKTNODE, "siftr_pktnode", "SIFTR pkt_node struct"); - -MALLOC_DECLARE(M_SIFTR_HASHNODE); -MALLOC_DEFINE(M_SIFTR_HASHNODE, "siftr_hashnode", "SIFTR flow_hash_node struct"); +static MALLOC_DEFINE(M_SIFTR, "siftr", "dynamic memory used by SIFTR"); +static MALLOC_DEFINE(M_SIFTR_PKTNODE, "siftr_pktnode", + "SIFTR pkt_node struct"); +static MALLOC_DEFINE(M_SIFTR_HASHNODE, "siftr_hashnode", + "SIFTR flow_hash_node struct"); /* Used as links in the pkt manager queue. */ struct pkt_node {