don't segfault if mmap() failed
Merge pull request #27 from tony2001/simplify

don't segfault if mmap() failed