[Wine]Quick fix for jack_fst?

Walt Ogburn reuben at ugcs.caltech.edu
Sat Oct 30 16:43:48 CDT 2004

Hi guys,

Starting a new thread because the old one got very long...

I think that the information in the wine developer's guide at these two
pages is relevant here:


It seems that wine_init imposes some Windows-style memory constraints, and
the big memory patch probably had some effect on this.  The result is that
allocating big things after wine_init (called by fst_init) can cause
crashes.  I don't know if this is a bug in Wine, a constraint on how winelib
applications should do things, or something else, because these memory
issues are beyond me.  If somebody more knowledgeable wants to step in

A quick fix for jack_fst seems to be to pre-reserve a chunk of memory,
exactly like jack_activate does, but before wine_init gets called.  I put
the following function into jfst.c:


void jfst_reserve_mem (int bufsize)
        char buf [bufsize];
        int i;

        fprintf (stderr, "Reserving memory: base=%p, size=%d, end=%p\n",
                buf, sizeof(buf), buf+sizeof(buf));
        for (i=0; i<bufsize; i++)
                buf[i] = (char) (i % 256);


and then insert "jfst_reserve_mem(1000000);" into main() somewhere before
fst_init.  There is no crash, but I don't know if the console thingy works
right because its infinite knobs and buttons confuse me, and I don't think
I have jack working properly.

- Walter

More information about the wine-users mailing list