hlison@bbn.com (Herb Lison) (07/05/90)
I'm having a problem allocating a larger stack than the default. I've got a large program, approximately 330 K for the .EXE file. When I increase the stack size from 2K to 8K with the EXEMOD utility, the program immediately exits with a stack overflow error (R6000). Running the program with a smaller stack results in a stack overflow error later on. I've tried using overlays, but this doesn't seem to make any difference. Anyone have any ideas on what do here? There's not much more code that I can hack away and I'm not going to be able to use extended memory. Thanks in advance. Herb Lison
pajerek@usenet@kadsma (Don Pajerek) (07/06/90)
In article <14298@silica.BBN.COM> hlison@bbn.com (Herb Lison) writes: >I'm having a problem allocating a larger stack than the default. I've >got a large program, approximately 330 K for the .EXE file. When I >increase the stack size from 2K to 8K with the EXEMOD utility, the >program immediately exits with a stack overflow error (R6000). Running >the program with a smaller stack results in a stack overflow error later >on. I've tried using overlays, but this doesn't seem to make any >difference. > >Anyone have any ideas on what do here? There's not much more code that >I can hack away and I'm not going to be able to use extended memory. >Thanks in advance. > >Herb Lison Have you tried using a /stack:8192 linker option? This will at least tell you at link time whether the 8K stack is too big. If it is, you'll have to make room for it by moving some data items out of the default data segment into a separate data segment (using the 'far' keyword). Enjoy, Don Pajerek