Paulo Marques wrote: > 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 :(
Found it: http://lkml.org/lkml/2008/8/26/197 It is almost 2 years old, so maybe things are better now. I actually found this link on an old thread on the avr gcc mailing list called "Stack usage under heavy inlining" that I started myself... I desperately need to go on vacation :P -- Paulo Marques Software Development Department - Grupo PIE, S.A. Phone: +351 252 290600, Fax: +351 252 290601 Web: www.grupopie.com "Left to his own devices, he'd be /dev/null." _______________________________________________ AVR-GCC-list mailing list AVR-GCC-list@nongnu.org http://lists.nongnu.org/mailman/listinfo/avr-gcc-list