Architectural support for designing dependable non-volatile main memories