Re: Towards a working "wine". [long]

From: Peter Edwards <peadar.edwards_at_gmail.com>
Date: Sat, 18 Jun 2005 12:43:56 +0100
On 6/18/05, Jon Dama <jd_at_ugcs.caltech.edu> wrote:
> My intuition says that mmap should ignore requests to map into the
> existing brk region but not reject requests that are merely between the
> existing brk region and the DS limit.
> 
> Is this what happens now?
> 

For the non-MAP_FIXED case, if the hint is in the data segment (ie, in
the range [daddr, daddr + RLIMIT_DATA), _not_  [daddr, break)), or is
NULL, it's adjusted to be just beyond the data segment. So, by
default, mmap() starts looking for space after the data segment.

So a low "hint", ie., one before the start of the data segment _wont_
be adjusted.

The hint itself is used as the starting address for the search for
enough address space to use: this search will return as soon as its
found enough room in the processes memory map.

Actually, there's a bit of a problem here: if you specify a low
address before the data segment, you can actually get mmap to deliver
memory inside the possible limits of the data segment, but after the
current position of the "break". It's certainly confusing behaviour,
but it might have some historical significance: Comments, anyone?
Received on Sat Jun 18 2005 - 09:43:57 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:37 UTC