Date: Fri, 29 Jul 2005 20:32:39 +0200 From: "jean-marc DETREZ" <jm.detrez@cegetel.net> To: <barner@FreeBSD.org>, <wine-devel@winehq.com>, <emulation@freebsd.org> Subject: TR: wine on FreeBSD with patch Message-ID: <20050729183247.2DC011A44F2@smtp.cegetel.net>
index | next in thread | raw e-mail
[-- Attachment #1 --]
_____
De : jean-marc DETREZ [mailto:jm.detrez@cegetel.net]
Envoyé : vendredi 29 juillet 2005 20:28
À : 'Alexandre Julliard'
Cc : 'barner@FreeBSD.org'; 'wine-devel@winehq.com'; 'emulation@freebsd.org';
'Dmitry Timoshkov'; 'Gerald Pfeifer'
Objet : TR: wine on FreeBSD with patch
_____
De : jean-marc DETREZ [mailto:jm.detrez@cegetel.net]
Envoyé : vendredi 29 juillet 2005 20:18
À : 'Alexandre Julliard'
Cc : 'barner@FreeBSD.org'; 'Gerald Pfeifer'; 'wine-devel@winehq.com';
'emulation@freebsd.org'; 'Dmitry Timoshkov'
Objet : wine on FreeBSD
Hi,
With the differents mails i receive from users or wine’s developers, i
think that:
- Dislike OpenBSD or SRV4, mincore did’nt fail if the page is
not mapped no [ENOMEM] error condition.
- the FreeBSD man pages say that mmap would fail with [ENOMEM]
error condition if address is in use but in the reality it seems always
return the start address.
So for to use wine on FreeBSD before doing a more clean patch i propose to
add this to mmap . I know that it would map memory pages without verify
before that the pages is’nt already map but the man pages say it must failed
so I’m just verify that the result is equal to start address the mmap call
asking for.
I do that only when creating System heap because requesting mmap
for 0x800000 start address (without MAP_FIXED) always fail and prevent wine
running on FreeBSD.
I’ll do more test to implement a try_mmap_fixed function working
on FreeBSD like this done for SRV4,NetBSD and DARWIN.
Jean-marc
[-- Attachment #2 --]
--- mmap.orig Mon Jun 20 13:43:47 2005
+++ mmap.c Fri Jul 29 18:57:55 2005
@@ -207,7 +207,13 @@ void *wine_anon_mmap( void *start, size_
#elif defined(__svr4__) || defined(__NetBSD__) || defined(__APPLE__)
if ( try_mmap_fixed( start, size, prot, flags, fdzero, 0 ) )
return start;
-#endif
+#elif defined(__FreeBSD__)
+ if (start == (void *)0x80000000)
+ { /* assume that was not very clean to do that but mincore didnt work to test if page is mapped in FreeBSD */
+ if (mmap (start, size, prot, flags | MAP_FIXED, fdzero, 0) == start)
+ return start;
+ }
+#endif
}
return mmap( start, size, prot, flags, fdzero, 0 );
#else
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050729183247.2DC011A44F2>
