The mmap documentation says following about the flag MAP_NORESERVE.
Do not reserve swap space for this mapping. When swap space is reserved, one ha
Just use a normal mmap(). Any modern enough OS (ie, past, what, 1995?) which implements mmap also implements demand paging, and pages will only be reserved if you actually write to them.
mmap()