Wrote most of the code for mmap() support (not functional yet)