Architecting Memory Systems For Emerging Technologies