(The correct code is in \'Update 5\')
I tried to map a range of memory from 0x100000000 to 0x200000000 in this example C code:
#include
If you do not actually have significantly more than 8G of swap configured, then that large mapping is likely to fail.
You can add the MAP_NORESERVE flag to mmap() to tell it not to reserve any swap space for the mapping up front.
MAP_NORESERVE
mmap()