[dpdk-dev] DDPK use of MAP_FIXED in mmap

Karmarkar Suyash skarmarkar at sonusnet.com
Mon Dec 8 20:02:38 CET 2014


Hello,

In DPDK when we use mmap why are we passing the MAP_FIXED flag when Linux man page itself says that the option is discouraged? Any specific reason for passing the MAP_FIXED flag?


http://linux.die.net/man/2/mmap

MAP_FIXED
Don't interpret addr as a hint: place the mapping at exactly that address. addr must be a multiple of the page size. If the memory region specified by addr and len overlaps pages of any existing mapping(s), then the overlapped part of the existing mapping(s) will be discarded. If the specified address cannot be used, mmap() will fail. Because requiring a fixed address for a mapping is less portable, the use of this option is discouraged.


Regards
Suyash Karmarkar


More information about the dev mailing list