lkml.org 
[lkml]   [2011]   [Jul]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 08/21] dynamic_debug: factor show_ddebug_query out of ddebug_parse_query
On Sat, Jul 16, 2011 at 11:32 PM, Jim Cromie <jim.cromie@gmail.com> wrote:
> using kasprintf would entail;
> - a local char* var,
> - a call to the string-producer (show_ddebug_query above)
> - a kfree(var)
> all in the caller context.
> Using a preallocated string buffer avoids this,
> and is slightly more efficient wrt kallocs.

I'm still missing an explanation why the static variable "prbuf_query"
is necessary. Wouldn't eliminating that static variable make the code
more elegant ?

Bart.


\
 
 \ /
  Last update: 2011-07-25 13:13    [from the cache]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and my Meterkast|Read the blog