Reducing energy usage with memory and computation-aware dynamic frequency scaling