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

Huw D M Davies h.davies1 at physics.ox.ac.uk
Thu Aug 28 04:44:49 CDT 2003

On Wed, Aug 27, 2003 at 07:30:32PM -0400, Todd Vierling wrote:
> On Wed, 27 Aug 2003, Alexandre Julliard wrote:
> : It's not really a question of shuffling back and forth, it's that
> : different users have different kernels; so if you want to ship a
> : binary that works for everybody, with your method you have to stick to
> : the lowest common denominator. With run-time checks you can have a
> : binary that takes advantage of new kernel features, while still
> : running everywhere.
> That's why there is a "#ifdef MAP_TRYFIXED".  If this is available at
> compile time, it is known to be available at runtime regardless of CPU
> platform -- it's not an optional kernel feature.

It's available on the machine that the binary is compiled on sure, but
what about the machine of a friend/customer who you've shipped the
binary to?  Just because you have the new kernel feature on your build
machine doesn't mean that everybody else does.  If you test at
run-time you avoid these problems.

Huw Davies
huw at codeweavers.com

More information about the wine-devel mailing list