Memory optimizations of embedded applications for energy efficiency