So I am rapidly approaching the memory limits of this particular chip. So in order to free up some additional (data) memory for a large buffer, I started reusing some global variables, and removing as much as possible. This as great as the compiler recognized this when I compiled.
However, I then found I had some local variables that could be reduced in size. When I did this (reduced some int to char), the compiler found no difference in data space. Intrigued, I moved these variables and made them global, only to find they then added to the data space.
What gives here? Why are my local variable seemingly being stored differently than my global variables?
However, I then found I had some local variables that could be reduced in size. When I did this (reduced some int to char), the compiler found no difference in data space. Intrigued, I moved these variables and made them global, only to find they then added to the data space.
What gives here? Why are my local variable seemingly being stored differently than my global variables?