Use mmap instead of fwrite.