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/net | |
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/net')
-rw-r--r-- | sys/net/hostcache.c | 4 | ||||
-rw-r--r-- | sys/net/hostcache.h | 6 | ||||
-rw-r--r-- | sys/net/if.c | 4 | ||||
-rw-r--r-- | sys/net/if.h | 9 | ||||
-rw-r--r-- | sys/net/radix.h | 6 | ||||
-rw-r--r-- | sys/net/rtsock.c | 4 |
6 files changed, 27 insertions, 6 deletions
diff --git a/sys/net/hostcache.c b/sys/net/hostcache.c index 761aa1f..78f4408 100644 --- a/sys/net/hostcache.c +++ b/sys/net/hostcache.c @@ -26,7 +26,7 @@ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id$ + * $Id: hostcache.c,v 1.1 1997/06/18 01:24:21 wollman Exp $ */ #include <sys/param.h> @@ -38,6 +38,8 @@ #include <net/hostcache.h> #include <net/route.h> +MALLOC_DEFINE(M_HOSTCACHE, "hostcache", "per-host cache structure"); + static struct hctable hctable[AF_MAX]; static int hc_timeout_interval = 120; static int hc_maxidle = 1800; diff --git a/sys/net/hostcache.h b/sys/net/hostcache.h index 47d631f..1e12803 100644 --- a/sys/net/hostcache.h +++ b/sys/net/hostcache.h @@ -26,7 +26,7 @@ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id$ + * $Id: hostcache.h,v 1.1 1997/06/18 01:24:22 wollman Exp $ */ #ifndef _NET_HOSTCACHE_H @@ -76,6 +76,10 @@ struct hctable { }; #ifdef KERNEL + +#ifdef MALLOC_DECLARE +MALLOC_DECLARE(M_HOSTCACHE); +#endif /* * The table-modification functions must be called from user mode, as * they may block waiting for memory and/or locks. diff --git a/sys/net/if.c b/sys/net/if.c index 16a61ea..e68637e 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)if.c 8.3 (Berkeley) 1/4/94 - * $Id: if.c,v 1.53 1997/09/07 11:09:22 joerg Exp $ + * $Id: if.c,v 1.54 1997/10/07 07:40:35 joerg Exp $ */ #include <sys/param.h> @@ -66,6 +66,8 @@ static void link_rtrequest __P((int, struct rtentry *, struct sockaddr *)); SYSINIT(interfaces, SI_SUB_PROTO_IF, SI_ORDER_FIRST, ifinit, NULL) +MALLOC_DEFINE(M_IFADDR, "ifaddr", "interface address"); +MALLOC_DEFINE(M_IFMADDR, "ether_multi", "link-level multicast address"); int ifqmaxlen = IFQ_MAXLEN; struct ifnethead ifnet; /* depend on static init XXX */ diff --git a/sys/net/if.h b/sys/net/if.h index 2646625..0fe9205 100644 --- a/sys/net/if.h +++ b/sys/net/if.h @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)if.h 8.1 (Berkeley) 6/10/93 - * $Id: if.h,v 1.45 1997/02/22 09:40:58 peter Exp $ + * $Id: if.h,v 1.46 1997/05/03 21:07:12 peter Exp $ */ #ifndef _NET_IF_H_ @@ -199,6 +199,13 @@ struct ifconf { #define ifc_req ifc_ifcu.ifcu_req /* array of structures returned */ }; +#ifdef KERNEL +#ifdef MALLOC_DECLARE +MALLOC_DECLARE(M_IFADDR); +MALLOC_DECLARE(M_IFMADDR); +#endif +#endif + /* XXX - this should go away soon */ #ifdef KERNEL #include <net/if_var.h> diff --git a/sys/net/radix.h b/sys/net/radix.h index dd4e23f..a7287e5 100644 --- a/sys/net/radix.h +++ b/sys/net/radix.h @@ -31,12 +31,16 @@ * SUCH DAMAGE. * * @(#)radix.h 8.2 (Berkeley) 10/31/94 - * $Id: radix.h,v 1.11 1997/02/22 09:41:12 peter Exp $ + * $Id: radix.h,v 1.12 1997/09/07 08:49:04 bde Exp $ */ #ifndef _RADIX_H_ #define _RADIX_H_ +#ifdef MALLOC_DECLARE +MALLOC_DECLARE(M_RTABLE); +#endif + /* * Radix search tree node layout. */ diff --git a/sys/net/rtsock.c b/sys/net/rtsock.c index 9801332..12650ac 100644 --- a/sys/net/rtsock.c +++ b/sys/net/rtsock.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)rtsock.c 8.5 (Berkeley) 11/2/94 - * $Id: rtsock.c,v 1.33 1997/09/02 01:18:49 bde Exp $ + * $Id: rtsock.c,v 1.34 1997/09/14 03:10:38 peter Exp $ */ @@ -52,6 +52,8 @@ #include <net/route.h> #include <net/raw_cb.h> +MALLOC_DEFINE(M_RTABLE, "routetbl", "routing tables"); + static struct sockaddr route_dst = { 2, PF_ROUTE, }; static struct sockaddr route_src = { 2, PF_ROUTE, }; static struct sockaddr sa_zero = { sizeof(sa_zero), AF_INET, }; |