Memory problem in winelib apps?

Walt Ogburn reuben at ugcs.caltech.edu
Wed Jun 22 13:53:47 CDT 2005


Thanks Mike.  I think the fixed problem Chris mentioned was a different
one, so I'll see if I can make jack_fst work properly using your
suggestion.

- Walter


On Wed, 22 Jun 2005, Mike McCormack wrote:

>
> 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
>



More information about the wine-devel mailing list