[RFC] mmap override patch

Chris Robinson chris.kcat at gmail.com
Mon Sep 20 21:12:08 CDT 2010

This is a patch that attempts to override mmap, mmap64, and munmap so that 
host libs can used memory from the Wine heap instead of being restricted to 
the address space Wine leaves unreserved. It is based on Albert Lee's patch 
found here:


It has been enhanced to fix the problem with using off64_t in the 
wine/library.h header by using ULONGLONG instead, and it should override the 
aforementioned functions with the correct prototype in 32-bit and 64-bit in a 
much simpler way.

It currently relies on the system having mmap or mmap64 that uses a 64-bit 
offset type, though if that's a problem, an extra wrapper can probably be 
made. It also relies on ULONGLONG being a 64-bit type, but from what I can 
tell, that will always true.

If there's a problem with it, or some way it can be improved, please let me 
know. :)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mmap-override.patch
Type: text/x-patch
Size: 20891 bytes
Desc: not available
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20100920/2f1dff4e/attachment.bin>

More information about the wine-devel mailing list