Fix some mmap generating.