lkml.org 
[lkml]   [2000]   [Jan]   [24]   [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)
(dropped Linus from cc as I believe it is not a very important topic)

On 24 Jan 2000, Jes Sorensen wrote:
> Jeff> I proposed something along these lines several months ago, poke
> Jeff> around for the thread. While I agree with the patch, because it
> Jeff> will save me a few lines of code here and there, an idea that
> Jeff> came out of the previous discussion is also worth considering --
> Jeff> zeroing pages during system idle time, and then handing those
> Jeff> out from kzalloc() (or kmalloc(GFP_ZERO|GFP_xxx) or whatever)
>
> Another thing I forgot to bring up earlier in the dicussion, most of
> the places doing kmalloc();memset(); are in initialization parts of
> the code, ie. they will be marked __init, so the optimization is a
> no-win, the only thing you save is to write one line less of code.

There are plenty of cases where it is used without __init. However, now
that I hear Jeff's idea of GFP_ZERO flag to kmalloc() I agree that it is
superiour. There is no need to invent (and export) a new function (with a
funny name as well) where the old one will suffice. Also, it saves an
extra function call.

Regards,
Tigran.


-
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    [W:0.044 / U:0.308 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site