add doc and mmap