This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Data Space grows unexpectedly

Hi all,
I've noticed something strange with one of
my 8051 projects. When I build the project, the build results show that I have used 98 bytes of data space. If I add the statement while(1) {} to the beginning of main(), my data space useage goes up to 161!, which is too much to fit in my SiLabs MCU.
If I move the while(1) statement down further in main(), the data useage starts getting less, until it reaches the original 98 when the while statement is placed at the very end of main(). Also, the statement while(0) {} does not cause any change in the data space useage value, regardless of where it is placed.

What is causing this wierd behaviour?

Thanks for all your help.
Tony

0