So I had a 'Out of memory' crash in my Glance code. According to System.getSystemStats().freeMemory, after reading an array of 1500 numbers, free memory went from 21 KB to 14 KB, so around 7 KB was used by the array. However, while storing the array back (where I still had 14 KB of free memory), it crashed with a 'Out of memory'. WHAT? As a test, I did a Storage.deleteValue BEFORE doing Storage.setValue and it didn't crash anymore. Weird that a setValue which is supposed to overwrite what's there in the first place takes that much free memory... Well at least now, I got it not to crash anymore lol.