Re: [-mm patch] make kcalloc() a static inline

From: Alan Cox
Date: Mon Aug 15 2005 - 08:32:40 EST


On Llu, 2005-08-15 at 16:06 +0300, Pekka J Enberg wrote:
> and I saw small reduction in kernel text with kcalloc() inlined. If GCC
> is, in fact, spreading the extra operations everywhere, shouldn't kernel
> text be bigger?

Only if the cost of the function call in lines of code is higher than
the inline code. That includes the less obvious cost for the fact that
its a synchronization point so you can't do certain optimisations
through a function call (the function you are calling may read/write any
global/static variable or pointer target).

Alan

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/