lkml.org 
[lkml]   [2000]   [Jan]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch-2.3.40-pre6] kzalloc() (ala kmem_zalloc() of SVR4)
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@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:56    [from the cache]
©2003-2011 Jasper Spaans