Use mmap instead of malloc