Check the return value of mmap