[Gambas-user] Stack Size Question

PV oreip at ...1...
Tue May 24 10:21:32 CEST 2005


On 24/05/2005 01:38, nando wrote:
> Benoit,
> 
> Thank you for your replies.
> I will do my best for examples/source for problems.
> 
> How deep is the Stack?
> Can it be changed?
> At runtime, can I find out how much is used?

Well, Benoit will of course give you more detailed and appropriate
explanations, but in the meanwhile I can tell you what I discovered about the
stack.

Since I had a deeply recursive function, I used up all the stack space so I
went around to see how this could be changed.

I found out something interesting in main/gbx/gbx_stack.c, namely the
STACK_size variable which is by default 16K.

I increased it and recompiled gambas, and didn't run out of stack space anymore.

Hope it helps.

Ciao,
Piero






More information about the User mailing list