Yahoo Groups archive

Lpc2000

Index last updated: 2026-04-28 23:31 UTC

Message

Re: [lpc2000] unexplained RAM use on GCC and CrrosWorks

2005-11-21 by Tom Walsh

Gus wrote:

>put the following code in a file and compile it. it takes 240 byte 
>of RAM!!!!!!
>
>Can anyone explain why?
>Remove any one of the cases and the RAM usage goes down to NONE!!!
>
>int foo(int i)
>{
>    switch (i)
>    {
>            case 0x22:
>            case 0x2A:
>            case 0x2B:
>            case 0x3E:
>            case 0x5C:
>            case 0x5D:
>                    return 12;
>            break;
>    }    
>}
>
>  
>
Perhaps you can explain it to yourself, did you try  taking a look at 
the listing file (lss) or did you try an arm-elf-objdump -S -D 
<filename.obj)  to see what is "in there" ??

TomW


>
>
>
>
>
> 
>Yahoo! Groups Links
>
>
>
> 
>
>
>  
>


-- 
Tom Walsh - WN3L - Embedded Systems Consultant
http://openhardware.net, http://cyberiansoftware.com
"Windows? No thanks, I have work to do..."
----------------------------------------------------

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.