On Mon, Mar 18, 2019 at 10:43:12PM +0100, Marek Marczykowski-Górecki wrote:
> On Mon, Mar 18, 2019 at 06:37:31PM +0100, Roger Pau Monne wrote:
> > Or if it's not possible to honor the hinted address an error is returned
> > instead. 
> 
> Just to be sure: MAP_FIXED will cause to map at specified address, even
> if something is mapped there already. From mmap(2):

That should be fine. We do want to replace an exiting mapping (which is
munmap before the mmap call), but it would have been nice to know when
something is already mapped, to detect programming error.

>     If the memory region specified by addr and len overlaps pages of any
>     existing mapping(s), then the overlapped part of the existing map‐
>     ping(s) will be discarded.  If the specified address cannot be used,
>     mmap() will fail.

-- 
Anthony PERARD

Reply via email to