Messages in this thread |  | | | Date | Mon, 26 Sep 2005 10:38:01 -0700 (PDT) | | From | Christoph Lameter <> | | Subject | Re: Make kzalloc a macro |
| |
On Fri, 23 Sep 2005, Andrew Morton wrote:
> I'd question the usefulness of this. It adds more code to a fastpath > (kmem_cache_alloc) so as to speed up a slowpath (kzalloc()) which is > already slow due to its memset.
It tries to unify both and make usage consistent over the allocator functions in slab.c. kzalloc essentially vanishes.
> It makes my kernel a bit fatter too - 150-odd bytes of text for some > reason.
Yes the inline function doubles the code generated for obj_checkout because it occurs in __cache_alloc and __cache_alloc_node. __cache_alloc is also an inline and is expanded three times.
Removing the inline from __cache_alloc could reduced code size. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
|  |