Thread: Stack overflow

  1. #1
    Registered User
    Join Date
    Mar 2009
    Posts
    28

    Stack overflow

    When i problem-solve i get this sign"Stack ovelflow" how can getover this???

  2. #2
    Registered User
    Join Date
    Feb 2003
    Posts
    596
    Many things can cause that sort of error. It's impossible to give you a useful answer without seeing the code that is causing it.

  3. #3
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    I'm not in full agreement with R. Stiltskin, but yes, it's hard to give DIRECT advice further than what the error message itself says: You have tried to use stack-space beyond the maximum allowed size of the stack. This is USUALLY caused by either excessive recursion or many/large local variables (or a combination of these two).

    You get over it by choosing a solution that doesn't involve the excessive use of stack.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  4. #4
    Registered User
    Join Date
    Feb 2003
    Posts
    596
    Quote Originally Posted by matsp View Post
    You get over it by choosing a solution that doesn't involve the excessive use of stack.
    --
    Mats
    "Doctor, it hurts when I do this ..."

  5. #5
    Registered User Maz's Avatar
    Join Date
    Nov 2005
    Location
    Finland
    Posts
    194
    or in some cases by increasing the size of the threads stack. Some systems have relatively small default stacks.

  6. #6
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Quote Originally Posted by Maz View Post
    or in some cases by increasing the size of the threads stack. Some systems have relatively small default stacks.
    Of course. Since the Original post didn't mention stacks, I didn't think it was likely to be relevant, but sure.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Stack overflow errors in 3 areas
    By ulillillia in forum C Programming
    Replies: 13
    Last Post: 04-29-2007, 03:20 PM
  2. stack and pointer problem
    By ramaadhitia in forum C Programming
    Replies: 2
    Last Post: 09-11-2006, 11:41 PM
  3. Question about a stack using array of pointers
    By Ricochet in forum C++ Programming
    Replies: 6
    Last Post: 11-17-2003, 10:12 PM
  4. error trying to compile stack program
    By KristTlove in forum C++ Programming
    Replies: 2
    Last Post: 11-03-2003, 06:27 PM
  5. Stack Program Here
    By Troll_King in forum C Programming
    Replies: 7
    Last Post: 10-15-2001, 05:36 PM