NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: mmap and MAP_FIXED



> On 12 May 2016, at 17:09, Daniel Jour <daniel.oertwig%gmail.com@localhost> wrote:
> 
> Martin wrote:
>> # define TRY_EMPTY_VM_SPACE    0xb0000000
> 
> Using this address actually works :) So I guess for some reason I cannot
> mmap addresses as high up as 0x4000000000000 ... the questions is:
> Why, when it seems to be unmapped?

sys_mmap() found in sys/uvm/uvm_mmap.c tests FIXED maps for (values for
amd64 in parentheses) for

    addr >= VM_MIN_ADDRESS (0)

and

    addr+size <= VM_MAXUSER_ADDRESS (0x00007f8000000000)

You try a value above VM_MAXUSER_ADDRESS:

    0x0004000000000000 > 0x00007f8000000000

--
J. Hannken-Illjes - hannken%eis.cs.tu-bs.de@localhost - TU Braunschweig (Germany)



Home | Main Index | Thread Index | Old Index