Abstract-Phase change memory (PCM) has emerged as a promising technology for main memory due to many advan tages, such as better scalability, non-volatility and fast read access. However, PCM's limited write endurance restricts its However, current wear-leveling and salvaging schemes have not been designed and integrated to work cooperatively to achieve the best PCM device lifetime. In particular, a non contiguous PCM space generated from salvaging complicates wear leveling and incurs large overhead. In this paper, we propose LLS , a Line-Level mapping and Salvaging design. By allocating a dynamic portion of total space in a PCM device as backup space, and mapping failed lines to backup PCM , LLS constructs a contiguous PCM space and masks lower level failures from the OS and applications. LLS seamlessly integrates wear leveling and salvaging and copes well with modern OSs , including ones that support multiple page sizes.Our experimental results show that LLS achieves 24% longer lifetime than a state-of-the-art technique. It has negligible hardware cost and performance overhead.