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
STACKSIZE 3000000
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.
Mike