libwine: Only partially reserve memory beyond 0x80000000 on FreeBSD.
Tijl Coosemans
tijl at ulyssis.org
Fri Mar 27 04:46:03 CDT 2009
On Tuesday 24 March 2009 12:36:05 Francois Gouget wrote:
> Tijl Coosemans a écrit :
> [...]
>> Wine wants to allocate a few things in reserved areas, and because
>> there were no reserved areas at all on FreeBSD it failed. That's bug
>> 16023. My patch leaves enough reserved area for Wine to allocate
>> these, but otherwise reservation isn't needed like it is on Linux.
>
> I have tested your patch here and the Flash installer still works. So
> I guess that means your analysis is spot on and that it's ok to apply
> it. Probably Alexandre will know.
So, what do you think about this patch Alexandre?
-------------- next part --------------
diff --git libs/wine/mmap.c libs/wine/mmap.c
index d107fc7..8286052 100644
--- libs/wine/mmap.c
+++ libs/wine/mmap.c
@@ -344,9 +344,13 @@ void mmap_init(void)
struct reserved_area *area;
struct list *ptr;
#ifdef __i386__
+ char *user_space_limit = (char *)0x7ffe0000;
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
+ reserve_malloc_space( 8 * 1024 * 1024 );
+ reserve_area( user_space_limit, (char *)0x82000000 );
+#else
char stack;
char * const stack_ptr = &stack;
- char *user_space_limit = (char *)0x7ffe0000;
reserve_malloc_space( 8 * 1024 * 1024 );
@@ -377,6 +381,7 @@ void mmap_init(void)
reserve_area( base, end );
}
else reserve_area( user_space_limit, 0 );
+#endif
#endif /* __i386__ */
/* reserve the DOS area if not already done */
More information about the wine-devel
mailing list