tpatko
2010-Sep-26 13:48 UTC
[Wine] Re: Memory Limitations for WINE 1.1.33 under Mac OS Leopard
I noticed in the loader/main.c that there seems to be some comment that it might be possible to set a build such that 3GB of memory can be allocated for a 32-bit process (through virtual memory mapping). static void check_vmsplit( void *stack ) { if (stack < (void *)0x80000000) { /* if the stack is below 0x80000000, assume we can safely try a munmap there */ if (munmap( (void *)0x80000000, 1 ) == -1 && errno == EINVAL) fprintf( stderr, "Warning: memory above 0x80000000 doesn't seem to be accessible.\n" "Wine requires a 3G/1G user/kernel memory split to work properly.\n" ); } } If this is possible, are there some instructions on how to modify the source code and/or configuration after the build to support this? Lastly, are these modification possible when building on Macintosh? Cheers, Thomas
James McKenzie
2010-Sep-26 15:01 UTC
[Wine] Memory Limitations for WINE 1.1.33 under Mac OS Leopard
On 9/26/10 6:48 AM, tpatko wrote:> I noticed in the loader/main.c that there seems to be some comment that it might be possible to set a build such that 3GB of memory can be allocated for a 32-bit process (through virtual memory mapping). > > static void check_vmsplit( void *stack ) > { > if (stack< (void *)0x80000000) > { > /* if the stack is below 0x80000000, assume we can safely try a munmap there */ > if (munmap( (void *)0x80000000, 1 ) == -1&& errno == EINVAL) > fprintf( stderr, > "Warning: memory above 0x80000000 doesn't seem to be accessible.\n" > "Wine requires a 3G/1G user/kernel memory split to work properly.\n" ); > } > } > > If this is possible, are there some instructions on how to modify the source code and/or configuration after the build to support this? Lastly, are these modification possible when building on Macintosh? >This should work on a Mac (from my understanding of the underlying UNIX operating system), depending on the amount of memory that can be allocated to the 32 bit process. If you have 4GB or less, Wine will not be able to use the entire 4GB on a Mac due to Memory Management issues, even if you manage to setup a huge swapfile, that are outside of the Wine project's scope. James McKenzie
vitamin
2010-Sep-27 13:56 UTC
[Wine] Re: Memory Limitations for WINE 1.1.33 under Mac OS Leopard
tpatko wrote:> I noticed in the loader/main.c that there seems to be some comment that it might be possible to set a build such that 3GB of memory can be allocated for a 32-bit process (through virtual memory mapping).Wine supports this as-is. All you need is an application compiled as large memory aware executable. Then Wine will let it allocate up-to 3GB per process (less all the libraries of course).
tpatko
2010-Sep-27 15:06 UTC
[Wine] Re: Memory Limitations for WINE 1.1.33 under Mac OS Leopard
Wine supports this as-is. All you need is an application compiled as large memory aware executable. Then Wine will let it allocate up-to 3GB per process (less all the libraries of course). Is this true even when built on Mac were the wine_dos variable is statically allocated before compiling? My application of interest is a 32-bit binary which is in fact large memory aware. --Thomas