[patch-2.3.40-pre6] kzalloc() (ala kmem_zalloc() of SVR4)
Matthew Kirkwood
weejock en ferret.lmh.ox.ac.uk
Sab Ene 22 07:27:59 CST 2000
On Fri, 21 Jan 2000, Tigran Aivazian wrote:
> > The only thing it does is to introduce a new non standard name which
> > makes current code less readable.
>
> Incorrect, it makes code smaller and more readable at the cost of
> extra function call and an if.
Jes' and Ingo's assertions boil down to the fact that there is probably
a lot of code which does:
struct foo * p = alloc_somehow(sizeof(foo));
memset(p, 0, sizeof(foo));
where it should use a little extra clues to know that a full zeroing of
the structure is unnecessary.
Search the archives for Jakub Jelinek's patch yesterday (or the day
before) which applied that logic to some of the signal code and found
significant potential savings.
Matthew.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo en vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/
Más información sobre la lista de distribución Ayuda