I am using Keil Real view compiler for lpc1788 controller. It has 512k flash and 96k RAM memory.
After some programming on this, memory consumption is like this.
Program Size: Code=88112 RO-data=32960 RW-data=3544 ZI-data=27896
Now, i observed something after adding one array in main function, which i am not getting why it is happening like this?
Expand|Select|Wrap|Line Numbers
- main{
- char* n[]={"name1","name2","name3"};
- while(1);
- };
after adding this array,
Program Size: Code=88132 RO-data=42644 RW-data=3544 ZI-data=27896
How it is increasing RO-Data 9.4k bytes at a time.
I changed it to const char* n[],and char n[3][5].
And i removed 2 strings out of that, even though it showing same increment in RO-Data.
How it is happening??