lkml.org 
[lkml]   [2006]   [Apr]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: Compiling C++ modules
Date
On Monday 24 April 2006 23:50, you wrote:
> Oh, and yeah, a = b + c *is* more readable than
>
> a = malloc(strlen(b) + strlen(c));
> strcpy(a,b);
> strcat(a,c);
>
> and contains fewer bugs ;)

and a hidden memory allocation.
Which GFP flag would you use for the allocation?
(And how would you actually _pass_ it)
GFP_KERNEL? Good luck, if you see a
a = b + c;
in atomic context.
GFP_ATOMIC? Well, we both don't want that.
Checking is_atomic() and deciding upon that?
I call that overhead... .

--
Greetings Michael.
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2006-04-25 17:30    [W:2.059 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site