Added constructor of Memory.