lkml.org 
[lkml]   [2004]   [May]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Linux 2.6.7-rc2


On Mon, 31 May 2004, Peter Osterlund wrote:
>
> If I put "#if 0" around the *wdata assignment in nfs_writepage_sync,
> the stack usage goes down to 36, so it looks like gcc is building a
> temporary structure on the stack and then copies the whole thing to
> *wdata.

Yeah, that's silly. But understandable. A lot of problems go away by doing
a temporary private node..

> Does this construct save stack space for any version of gcc? Maybe the
> code should be changed to do a memset() followed by explicit
> initialization of the non-zero member variables instead.

In this case, I'd agree.

In some other cases, it's better to create a initialized static variable,
and just use that as an initial initializer. In this case that doesn't
much help, since none of the fields are constant.

Trond?

Linus
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2009-11-18 23:46    [W:0.204 / U:1.836 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site