Hi all,
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?
In the above code, n is a local 2d variable which is having 3 strings. Each string's length is 5 characters so size will be 5 bytes for each. total array size will be 15 bytes.
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??
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?
Code:
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??
Comment