Go Down

Topic: Running out of memory? (Read 349 times) previous topic - next topic

Hoeken

What happens when you try to use more memory than the Arduino has?  Does the compiler error?  Does your code just do weird things, etc?

Also, how much does it have?  i've read 1k in various places, is that right?

westfw

The micros used in the Arduino have 1K of "ram", usable for changing data.  That's partially used by things like "the stack."  I don't see any warnings from the compiler if I deliberately exceed the memory with something like:
Code: [Select]
unsigned long bigdata[300];
Some of the things that would traditionally be stored in "ram" can be stored in EEPROM (512 bytes) or the flash instead (there is 14k of flash) using the PROGMEM directive, but it becomes annoying to access...

Hoeken

hmm... i havent run into any problems yet, but i could definitely see the potential for it, especially since i'm trying a full-on object oriented approach as well as doing something rather complicated (3 axis controller w/ limit switches + serial comms)

Go Up