Failure-atomic msync() enables you to treat an mmap(2)ed file as a transactional data store that is robust in the face of power outages. Famus implements it in user space by employing write-ahead logging. As a bonus it optionally versions your file and lets you go back in time as needed.