[resend] Allow use of MAP_TRYFIXED for better mmap()

Todd Vierling tv at pobox.com
Tue Aug 26 19:47:14 CDT 2003

On Tue, 26 Aug 2003, Alexandre Julliard wrote:

: If you want to keep compatibility with older kernels, you'll need to
: check if MAP_TRYFIXED is available at runtime,

NetBSD isn't like Linux.  In NetBSD, the kernel, includes, and libc are not
bidirectionally interchangeable; they are unidirectionally upgraded.  A
binary compiled with newer libc and kernel is documented not to work on
older kernels and libc.  This is a little less true for release branches,
but features do still appear between minor releases, with this same caveat.

In general, this holds true with other applications on NetBSD.  If a feature
appears in the C headers, it is assumed to exist.  The patch is in line with
NetBSD's compatibility principles.

Adding runtime detection code is IMHO just introducing an unnecessary OS
dependency garbage code block, and I'd rather avoid that pollution.

: Or if you don't need to maintain compatibility then you should get rid of
: the NetBSD ifdefs completely.

For now, I'd like to keep try_mmap_fixed() around for with systems that have
not upgraded to kernels capable of MAP_TRYFIXED.  The try_mmap_fixed()
method works fine on newer NetBSD systems, so binaries compiled with older
headers still work even if the kernel supports MAP_TRYFIXED.  (They'll just
be slower.  8-)

-- Todd Vierling <tv at pobox.com>

More information about the wine-devel mailing list