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

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

Re: [avr-gcc-list] string initialization using "" and { }


From: Graham Davies
Subject: Re: [avr-gcc-list] string initialization using "" and { }
Date: Wed, 27 May 2009 10:31:08 -0400

Stu Bell wrote:
[The compiler] stores the string constant in
flash and then copies it into the stack ...

The string is stored in flash only to initialize the string variable in RAM. It is copied from RAM to the automatic variable on the stack. It is important to understand that using the string initializer consumes both RAM and flash for the string as well as producing more code.

Graham.






reply via email to

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