Thread stack size (was: varbind management/construction problem)
D. R. Evans
N7DR____arrl.net
Fri Oct 4 02:04:13 CEST 2002
On 28 Sep 2002 at 13:33, Jochen Katz wrote:
> Dave Mason wrote:
> > Woohoo! That did it. The stack size in threads.h was 10000. I tried
> > 100000 and it ran fine. Do you have any suggestion as to how to determine
> > the correct stack size?
>
> Sorry, no. Does anybody on the list have an answer/link regarding this
> question?
>
No, but I have another question. Why isn't the -fstack-check flag used in
the g++ makefiles?
http://gcc.gnu.org/onlinedocs/gcc-2.95.3/gcc_2.html#SEC2 says:
>@gcctabopt{-fstack-check}
>Generate code to verify that you do not go beyond the boundary of the
>stack. You should specify this flag if you are running in an environment
>with multiple threads, but only rarely need to specify it in a
>single-threaded environment since stack overflow is automatically
>detected on nearly all systems if there is only one stack. Note that this
>switch does not actually cause checking to be done; the operating system
>must do that. The switch causes generation of code to ensure that the
>operating system sees the stack being extended.
This is pretty vague as to whether stack checking really gets done under
any particular OS (it sure would be nice to see a list of OSes that really
do the checking properly), but it isn't vague that the flag should be used.
Doc
More information about the AGENTPP
mailing list