Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/sys/nfs



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@localhost 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@localhost



Home | Main Index | Thread Index | Old Index