Author Topic: Stack Size  (Read 6321 times)

Offline mconflict

  • Single posting newcomer
  • *
  • Posts: 2
Stack Size
« 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

Offline Radek

  • Multiple posting newcomer
  • *
  • Posts: 104
Re: Stack Size
« Reply #1 on: March 21, 2012, 06:15:18 pm »
Allocate instead of using local variables.

Offline mconflict

  • Single posting newcomer
  • *
  • Posts: 2
Re: Stack Size
« Reply #2 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.

Offline frithjofh

  • Regular
  • ***
  • Posts: 376
Re: Stack Size
« Reply #3 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  ;)
architect with some spare time  -  c::b compiled from last svn  -   openSuSE leap x86_64  -  AMD FX-4100

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7252
Re: Stack Size
« Reply #4 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 !