On 05/19/2011 10:52 AM, Gaetan Gaumer wrote:
So I have two questions : 1) Do you have an idea why the mmap function maps the segment at a different address from the provided one, knowing that this address is the one returned from code below on another process (so should be valid) ?
Perhaps that address space was already being used by something. This is likely to be the case with large regions on a 32-bit OS. How large is is the segment you're trying to map? Is your process running as 64- or 32-bits?
2) In the mapped_region constructor, when a non null address value is given as a parameter, could we use the MAP_FIXED flag to force the mmap function to map the segment at the provided address ?
What happens if something else is already at that address? - Marsh