The RAM issue is probably because of the useless ucos2 port that is used as the operating system, it preallocates framebuffers and other things that needn't be pre-allocated. To be honest the only fix for this that I can see is to either unload some of the OS ram into the flash memory and back each time the program is run, or just use linux.