You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
git-svn-id: https://gnunet.org/svn/libmicrohttpd@25941 140774ce-b5e7-0310-ab8b-a85725594a96
0 commit comments