On Wed, Jan 30, 2013 at 1:11 PM, Christian Grothoff
<address@hidden> wrote:
Absolutely right. Changed as suggested in SVN 25941.
Happy hacking!
-Christian
On 01/30/2013 12:11 PM, Martin Velek wrote:
Hello,
could be possible to change declarations for arrays of strings in the
file reason_phrase.c?
Currently it is static const char * []. This places all strings into
.rodata section and pointers to them into LMA of .text and also into
.data in VMA.
E.g. for an ARM Cortex M3 (flash + SRAM) compiled with a arm-none-eabi-gcc
static const char *one_hundred[] = {
"Continue",
"Switching Protocols",
"Processing"
};
Strings "Continue", "Switching Protocols", "Processing" are stored in
flash. Also an array with pointers to strings is stored in flash. In
addition, this array is copied into SRAM (+16 bytes). If you would
change it to "static const char * const one_hundred[]" ... it would
occupy only flash.
and
struct MHD_Reason_Block
{
......
const char * const * data;
};
I agree, it is not relevant on a PC but on most microcontroller the SRAM
is a limiting factor not the rom(flash).
Best
Martin Velek