Optimise performance by doing only one mmap() instead of one per method