Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: mconflict on March 21, 2012, 05:57:45 pm

Title: Stack Size
Post by: mconflict on March 21, 2012, 05:57:45 pm
How do I increase the stack size...?

I tryed  -Wl,--stack=50000000 in the other option linker thingy... didn't work,

I tryed in the compiler options it doesn't work...

I have to get 200'000 words read in a file and it crashed at the 7700th
Title: Re: Stack Size
Post by: Radek on March 21, 2012, 06:15:18 pm
Allocate instead of using local variables.
Title: Re: Stack Size
Post by: mconflict on March 21, 2012, 06:16:55 pm
Allocate instead of using local variables.

What do you mean?

Sorry I'm a beginner in C programming.
Title: Re: Stack Size
Post by: frithjofh on March 21, 2012, 06:27:26 pm
Hi,

what he is telling you is that such amount of variables you should allocate on the heap with "malloc" in the case of C and "new" in the case of C++.

But this is stuff you should look up in a programming book, it does not really belong on this forum. I bet the administrators will lock this topic any minute now...

Good luck reading  ;)
Title: Re: Stack Size
Post by: Jenna on March 21, 2012, 07:04:47 pm
But this is stuff you should look up in a programming book, it does not really belong on this forum. I bet the administrators will lock this topic any minute now...

Correct and locked !