Subject: Re: CVS commit: src/sys/nfs
To: Jason Thorpe <thorpej@wasabisystems.com>
From: David Laight <david@l8s.co.uk>
List: source-changes
Date: 05/29/2003 07:44:39
On Wed, May 28, 2003 at 10:22:54PM -0700, Jason Thorpe wrote:
> 
> On Wednesday, May 28, 2003, at 07:57  PM, itojun@iijlab.net wrote:
> 
> > 	i remember someone (thorpej?) proposed to get rid of uppercase version
> > 	by having some C inline function for free/malloc.  what is the status?
> 
> It was cgd's suggestion.  Basically, use __builtin_constant_p() to 
> determine if the argument is a constant, and if not, have MALLOC() make 
> the function call instead of doing the expensive inline.

Is it worth splitting the interface so that there can be a third way?
That is do the log2(size) in a macro (so the compiler can do the
sum at compile time) but not inline the totality of the code?

	David

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