EasyC Pro variable memory used

How can you tell in EasyC Pro how much variable space has been used and especially how much is left?

Many have asked the same question, and from what I can tell, they’ve all gotten no reply. All I can tell you is that the VEX micorcontroller has 1800+1024 bytes of EEPROM (electrically erasable programmable read only memory) variable space (total of 2824 bytes for those of you who just woke up or are reading this late at night). It’s about 2.5 KB, out of 32 KB of program memory. If you’re using that much variable space, that means you have 2824 static unsigned char’ss going at the same time. It would be 1882 static short’s, 1412 static int’s, 1129 static long’s, or 941 static long long’s. Even with the WPILib API consuming some of the variable space, I seriously doubt that any program you’re going to write will come anywhere close to that. And remember, that’s just for static variables. When you have regular variables, each one is constructed and destructed with the function call, so whenever you call a different function, the variables that went with the last function called are no longer there, freeing up variable space. I think you’re fine.

That was very helpful. I had no idea how close and what wpi and api were using.

I do know that I have filled up all the cable slots and the program memory is at 29k. I just didn’t want to be surprised by running our of variable space.

I suppose I could make up a couple of arrays and see when it fills up. Not even sure what kind of error you get.

So I guess I won’t worry about it now.

At compile time you get an out of memory error, and if you are malloc’ing you will get a null pointer.