Stack Overflow ( HELP PLEASE ) 
Author Message
 Stack Overflow ( HELP PLEASE )

     I'm using a recursive function to mimic "floodfill" for SVGA.

Unfortunately, my new function keeps giving me a stack overflow.  How do I

increase the stack?  Could anybody give me a hint?  I've tried different

memory models and everything else I could think of.

     The procedure can't really be using up all available memory cuz the

procedure only fills about 1000 pixels before it overflows.

Bor-Tyng Lin

Please mail me as I don't read this group often.



Fri, 24 Mar 1995 07:44:46 GMT  
 Stack Overflow ( HELP PLEASE )

Quote:

>     I'm using a recursive function to mimic "floodfill" for SVGA.
>Unfortunately, my new function keeps giving me a stack overflow.  How do I
>increase the stack?  Could anybody give me a hint?  I've tried different
>memory models and everything else I could think of.

        Here's what I use:

        extern unsigned _stklen = 64000;

        This statement must (I think) be global; i.e. put it outside of
        all functions.

---
John Gordon                        My incredibly witty saying has been



Fri, 24 Mar 1995 12:09:02 GMT  
 Stack Overflow ( HELP PLEASE )


Quote:

>>     I'm using a recursive function to mimic "floodfill" for SVGA.
>>Unfortunately, my new function keeps giving me a stack overflow.  How do I
>>increase the stack?  Could anybody give me a hint?  I've tried different
>>memory models and everything else I could think of.

>    extern unsigned _stklen = 64000;

Another alternative is to code a better floodfill algorithm which doesn't
pound on the stack so much.  Sorry, this isn't meant to be a sarcastic
response, but unless you are coding this particular algorithm for a
particular reason, choosing a different one might be in order.

Quote:
>John Gordon                        My incredibly witty saying has been


C Frog


Fri, 24 Mar 1995 12:28:13 GMT  
 Stack Overflow ( HELP PLEASE )

Quote:


> >     I'm using a recursive function to mimic "floodfill" for SVGA.
> >Unfortunately, my new function keeps giving me a stack overflow.  How do I
> >increase the stack?

in MSC is a linkerswitch /STACK:<stack-size> to enlarge the stack.

Quote:
> >memory models and everything else I could think of.

>         Here's what I use:

>         extern unsigned _stklen = 64000;

>         This statement must (I think) be global; i.e. put it outside of
>         all functions.

could someone explain how thist should work please|

hans friedrich steffani
uni karlsruhe




Fri, 24 Mar 1995 22:42:26 GMT  
 Stack Overflow ( HELP PLEASE )
Quote:


>>     I'm using a recursive function to mimic "floodfill" for SVGA.
>>Unfortunately, my new function keeps giving me a stack overflow.  How do I
>>increase the stack?  Could anybody give me a hint?  I've tried different
>>memory models and everything else I could think of.

>    extern unsigned _stklen = 64000;

This is assuming the Borland C Compiler.

If you're using the MS compiler the size is a parameter to the linker
/STACK:XXXX

Jeff

--
--------------------------------------



Fri, 24 Mar 1995 23:09:39 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. C++ Builder Stack Overflow Error - Please help - Need to know how to overcome this Debugger Exception

2. Debug advice please - Stack overflow

3. Stack Structure and Stack Overflow for CE

4. stack overflow help?

5. stack overflow help

6. Stack overflow help sought

7. Help! Stack Overflow in Recursive

8. HTML help gives a stack overflow?

9. Help! Stack Overflow in Recursive

10. need help with stack overflow

11. 3 lines c code has stack overflow, help !

12. VC++ 1.52 Stack Overflow problem pls Help !!!

 

 
Powered by phpBB® Forum Software