[PATCH 0/2] Unaligned mmap() on Mac OS X
cdavis at mymail.mines.edu
Wed May 12 18:53:36 CDT 2010
On 5/12/10 5:37 PM, Ken Thomases wrote:
> What problems does this cause?
It makes Wine use more memory than it needs to.
> Can't we achieve that just by avoiding the mapping of the "mmap" identifier to the _mmap$UNIX2003 symbol?
We could for 32-bit, but not 64-bit.
> It may be sufficient to #define _NONSTD_SOURCE, #include <sys/mman.h> as the first header, #undef _NONSTD_SOURCE, and then continue to include any other headers.
Not on 64-bit (when support for that finally gets here). If you try that
in a 64-bit program, you get an error.
> Alternatively, you can probably use an approach like this:
Again, it won't work for 64-bit. On 64-bit, only the "conforming"
version is available. (Use nm on the System Library,
/usr/lib/libSystem.dylib, and see for yourself. Note that it doesn't
have the $UNIX2003 on the end because the UNIX '03 version is the only
one available there.)
The 32-bit version was ugly anyway. I'll submit a new patch series.
More information about the wine-devel