Add total memory in graphs