Fixed to refer a correct file descriptor.
Implemented mmap.