Materials and Physics for Nonvolatile Memories