lkml.org 
[lkml]   [2022]   [Jun]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [RFC[ Alloc in vsprintf
On Sun, Jun 26, 2022 at 1:39 PM Joe Perches <joe@perches.com> wrote:
>
> OK, and that's true for all the temp stack buffers in every %p<foo>.

Yup.

A lot of them are simply due to it just being simple, and when the
temp buffer is of a fairly limited size, "simple is good".

But yeah, that KSYM_SYMBOL_LEN thing was questionable before, and as
it grows with KSYM_NAME_LEN growing, it's getting pretty ridiculous.

For example, the buffer in "number()" looks very reasonable to me,
since it's not only pretty small (24 bytes on 64-bit architectures).
it has that special alignment requirement too.

So I don't think those temporary stack buffers are necessarily wrong
in general, but there's a point where they go from "ok, there's being
_simple_ and then there's _overly_simplistic_".

Linus

\
 
 \ /
  Last update: 2022-06-26 22:55    [W:0.091 / U:4.304 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site