Re: Hinted mmap(2) without MAP_FIXED can fail prematurely

2022-02-17 Thread Johnny Billquist
On 2022-02-18 01:05, Michael van Elst wrote: b...@softjar.se (Johnny Billquist) writes: If it would ignore the hint, what's the point of the hint then? With MAP_FIXED it must use the hint, without it's just a best effort attempt. Which then basically means that without MAP_FIXED, the hint

Re: Hinted mmap(2) without MAP_FIXED can fail prematurely

2022-02-17 Thread Michael van Elst
p...@cielonegro.org (PHO) writes: >I expected mmap(2) to search for an available region from the entire >address space starting from the hint, not only half of it. It's not even half.

Re: Hinted mmap(2) without MAP_FIXED can fail prematurely

2022-02-17 Thread Michael van Elst
b...@softjar.se (Johnny Billquist) writes: >If it would ignore the hint, what's the point of the hint then? With MAP_FIXED it must use the hint, without it's just a best effort attempt.

Re: Hinted mmap(2) without MAP_FIXED can fail prematurely

2022-02-17 Thread Johnny Billquist
If it would ignore the hint, what's the point of the hint then? Johnny On 2022-02-17 08:23, PHO wrote: I'm not sure if this is a bug or not, but on NetBSD/amd64 9.2, hinted mmap(2) without MAP_FIXED can fail prematurely with ENOMEM if all the regions below the given hint address are

Re: Hinted mmap(2) without MAP_FIXED can fail prematurely

2022-02-17 Thread PHO
I expected mmap(2) to search for an available region from the entire address space starting from the hint, not only half of it. On 2/17/22 5:32 PM, Johnny Billquist wrote: If it would ignore the hint, what's the point of the hint then?   Johnny On 2022-02-17 08:23, PHO wrote: I'm not sure