avr-gcc-list
[Top][All Lists]
Advanced

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

Re: [avr-gcc-list] Stack use - possible bug


From: Paulo Marques
Subject: Re: [avr-gcc-list] Stack use - possible bug
Date: Wed, 09 Jun 2010 15:02:42 +0100
User-agent: Thunderbird 2.0.0.23 (X11/20090817)

Dale wrote:
> Hi Paulo                                         >@2010.06.09_15:29:48_+0200

Hi, Dale

>> Dale wrote:
>>[...]
>> Sometimes this doesn't work correctly, but I wasn't able to produce a
>> simple case to show this problem (only very complex programs which I
>> didn't want to post online). :(
> 
> Likewise, which is why I ended up with a crippled sample :-) The concept
> is the same.
> 
> But you agree that there's stack used and never returned for reuse?

Yes, but in the example shown there is no opportunity for reuse, so we
can not know if the compiler would in fact reuse the space or not.

My point is that, in the example, if the compiler actually wrote code to
decrease the stack it would made the code worse, because it would be
doing operations on the stack pointer for nothing.

The problem is that people running gcc on "big" machines never notice
this. The other crowd that noticed it already was the linux kernel
people were the stack is limited to 4Kb. I'm trying to find a similar
thread that I remember reading on LKML, but my google-fu is letting me
down :(

-- 
Paulo Marques
Software Development Department - Grupo PIE, S.A.
Phone: +351 252 290600, Fax: +351 252 290601
Web: www.grupopie.com

"If cats were horses, we could ride up the trees."



reply via email to

[Prev in Thread] Current Thread [Next in Thread]