Results 1 to 4 of 4

Thread: increase the stack size

  1. #1

    Thread Starter
    Registered User
    Join Date
    Jul 2001
    Posts
    283

    increase the stack size

    i am using recursion to fill a polygon by checking one pixel at a time, so if the polygon is 100 x 100 pixels on the screen, then the procedure will call itself a maximum of 10000 times. Every time I get a stack overflow. If you want, i can send you the recursive function, but i don't think there is a problem with it, as it has worked based on the same principle in c++. Basically, how can i increase the amount of stack space available for my program?
    thanks in advance.

  2. #2
    yay gay PT Exorcist's Avatar
    Join Date
    Apr 2002
    Location
    . . . my reason of shame
    Posts
    2,729
    hmmmmmm..err but dont u think that call a function 10 000 times is a little too much? why dont you just make a big loop? i bet you won't get any stack problems with it..

    also are u opening in each instance of the function a new picture?
    \m/\m/

  3. #3
    Lively Member
    Join Date
    Aug 2003
    Location
    When?!?!
    Posts
    108
    Yes, loop. Calling a function 10,000 times is gonna make you 20 dollars less. hehe...... LOOP = 10,000 = "Rather have the money"
    DannyJoumaa
    Advanced VB6 Programmer
    Intermediate-Advanced VB .NET Programmer
    Intermediate C# Programmer
    Intermediate Win32 Developer
    Beginner Mac OS X Developer
    Contact: [email protected]

    Favorite Sayings:
    "Every time you open your mouth, you prove your an idiot."
    "God is a programmer. Satan is a bug. Life is debugging."

  4. #4

    Thread Starter
    Registered User
    Join Date
    Jul 2001
    Posts
    283
    i think that in my case i have to use recursion, since there is no better algorithm. so, before i give up on my problem, is it at all possible to increase the stack size?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width