John Reiser wrote:
Attached is the patch for http://bugs.winehq.org/show_bug.cgi?id=14365 do not touch high address space (initial stack, user_space_limit)
So what's wrong with what Wine doing now? The part you removed states what it's there for - to prevent needless allocation attempts at the end of the address space.
-- John Reiser, jreiser@BitWagon.com
--- wine-1.0/libs/wine/mmap.c 2008-06-17 07:07:31.000000000 -0700 +++ po49996-2008-06-30/wine-1.0/libs/wine/mmap.c 2008-06-30 17:18:29.000000000 -0700 @@ -233,7 +233,9 @@ return try_mmap_fixed( addr, size, PROT_NONE, flags, get_fdzero(), 0 ); #endif ptr = mmap( addr, size, PROT_NONE, flags, get_fdzero(), 0 );
- if (ptr != addr && ptr != (void *)-1) munmap( ptr, size );
- if (ptr != addr && ptr != (void *)-1) {
munmap( ptr, size );
- } return (ptr == addr);
}
What's the point of this change?
@@ -321,8 +323,8 @@ struct reserved_area *area; struct list *ptr; #if defined(__i386__) && !defined(__FreeBSD__) && !defined(__FreeBSD_kernel__) /* commented out until FreeBSD gets fixed */
- char stack;
- char * const stack_ptr = &stack;
- //char stack;
- //char * const stack_ptr = &stack - (10*1024*1024); // 10M stack expansion char *user_space_limit = (char *)0x7ffe0000;
No C++ comments please. If you removing something - remove it don't comment it.
Vitaliy.