Call mmap only once to prevent too many open files