I didn't bother doing the math, but I thought that 4000 integers would be under 30kB
But that shouldn't be what is causing the problem as the memory isn't written to when the program is compiled.
A 500 element int array should be safe.
With hmm 6 analog inputs
OK, that was not very clear when I bought it, I thought the MCU did everything in the 30kB space. So the 32kB is for the program only and 2kB is RAM?
...but only one analogue converter.