From bb6dbcf3b2a0d48c5fc4d87972a640bdeccff1ea Mon Sep 17 00:00:00 2001 From: julian Date: Wed, 10 Jan 2001 07:13:58 +0000 Subject: Fix some memory leaks Add memory leak detection assitance. --- sys/netgraph/ng_sample.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'sys/netgraph/ng_sample.c') diff --git a/sys/netgraph/ng_sample.c b/sys/netgraph/ng_sample.c index 90ed838..5c98b83 100644 --- a/sys/netgraph/ng_sample.c +++ b/sys/netgraph/ng_sample.c @@ -54,6 +54,14 @@ #include #include +/* If you do complicated mallocs you may want to do this */ +/* and use it for your mallocs */ +#ifdef NG_SEPARATE_MALLOC +MALLOC_DEFINE(M_NETGRAPH_XXX, "netgraph_xxx", "netgraph xxx node "); +#else +#define M_NETGRAPH_XXX M_NETGRAPH +#endif + /* * This section contains the netgraph method declarations for the * sample node. These methods define the netgraph 'type'. -- cgit v1.1