Memory problem in winelib apps?
mike at codeweavers.com
Tue Jun 21 20:42:06 CDT 2005
Walt Ogburn wrote:
> #define BUFSIZE 1044096
> /* #define BUFSIZE 2000000 */
> int PASCAL WinMain (HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show)
> char buf[BUFSIZE];
> int i;
Wine allocates a 1Mb stack by default, and more if a larger stack size
is specified in a PE executeable's header. You can specify the size of
the a .exe.so's stack by making a def file for it, and adding the line
that should fix the problem, however allocating a 2M buffer on the stack
seems like a waste of stack space, so it would be better to fix the
program to allocate memory on the heap, or directly using mmap.
More information about the wine-devel