avr-chat
[Top][All Lists]
Advanced

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

Re: [avr-chat] measuring stack/heap usage


From: Julius Luukko
Subject: Re: [avr-chat] measuring stack/heap usage
Date: Mon, 15 Mar 2010 08:43:11 +0200
User-agent: KMail/1.11.2 (Linux/2.6.28-18-generic; KDE/4.2.2; x86_64; ; )

On Sunday 14 March 2010, Christopher Harvey wrote:
> Maybe this is an unrelated question, but this topic reminded me to ask:
> Is there a way to ask the compiler to report the maximum stack height of
> a program? I know this is undecidable if there is recursion. Seems
> really relevant in the case of avrs, since the amount of heap space one
> can use depends on the amount of stack space used. (heap
> stack/collisions). I can't think of any way to decide how much heap
> space to use when I don't know how big the stack can get.
>
> Thanks,
> Chris

The compiler can generate a listing file, which reports the stack usage for 
each function. Look for text 'frame size='

-- 
Julius





reply via email to

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