Rockbox.org home
release
dev builds
extras
themes manual
wiki
device status forums
mailing lists
IRC bugs
patches
dev guide



Rockbox mail archive

Subject: Re: Stack Usage
From: BlueChip (cs_bluechip_at_webtribe.net)
Date: 2004-01-01


At 04:04 01/01/04, you wrote:
>Is there a way to tell how much stack is used? I'm trying to reduce the
>amount I use for bookmarking and would like to see if the tweaks I am doing is
>actually having an effect. I noticed that there is a "View OS Stacks" option,
>but I don't understand what it is showing.
>
>Thanks,
>Ben

from my experience of reversing C code...

to save stack space:

avoid:
local variables
recursive algorithms
& other deep call structures (proc1->proc2->proc3->proc4->...)

encourage:
replace tiny (2/3 lines) functions with macros
pass parameters between procedures via global (or broad scope) variables

obviously each has an impact on other aspects ..eg using macros generates
larger code (which runs faster ...mainly because of the lack of stack
useage - lol)

BC



Page was last modified "Jan 10 2012" The Rockbox Crew
aaa