use mmap to support persistent state of device