Subject: Re: FREE( s, M_xxxx ) - a bug you don't want to look for!
To: None <tech-kern@netbsd.org>
From: David Laight <david@l8s.co.uk>
List: tech-kern
Date: 06/27/2002 17:11:08
On Thu, Jun 27, 2002 at 03:10:26PM +0100, David Brownlee wrote:
> On Thu, 27 Jun 2002, Jaromir Dolecek wrote:
> 
> > Yes, MALLOC/FREE should only be used with fixed size
> > argument. It should never be used with variable size argument.
> >
> 	Would it make sense to change the macros to assert this?

How?
If you could 'assert' it you could force a call to malloc() instead.

I have my doubts as to how much these macros save?
Maybe I'll time a kernel build with them on/off.

I also suspect that replacing all the 'pool' allocates with
(a slightly modified) malloc() would be benefitial.

	David

-- 
David Laight: david@l8s.co.uk