Re: COMMAND_LINE_SIZE and CONFIG_FRAME_WARN

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 6 Nov 2009, Dmitri Vorobiev wrote:

> > It depends on your concerns.  You are still using 4096 bytes of stack, but
> > you are trying to trick the compiler into not warning.
> >
> > If you think the warning is bogus, you should remove it for all code, not
> > just this file.  If you think the warning is valid, then you should fix the
> > code so that it doesn't use as much stack space.
> 
> Frankly, I don't think that the warning is bogus, especially if we're
> talking about the case of the 4K page and 32-bit kernel, and I started
> thinking htat probably the static array solution would be the safest
> bet here.

 KSEG space is not paged, so who cares about the page size?  You're not 
making additional stack page allocations, although you can overflow the 
space available at some point (but that's avoided if you know a priori 
your backtrace is not going to be deep).  Static allocation has its 
drawbacks, for example it takes storage space (if it's initialised data) 
or memory space (if it's BSS) indefinitely.

  Maciej


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux