Comment 8 for bug 707064

Revision history for this message
Martin Kupec (martin-kupec) wrote :

Krzysztof Kościuszkiewicz:
>Even if rewritten to be iterative, we would have to maintain a stack
>of visited net segments ourselves - in addition to a hash the current
>version uses. This might give us better control over memory usage and we
>could fail gracefully when allocation fails - but will likely complicate
>the function. Is gschem even run on systems where stack does not grow
>automatically?

The problem here is, that the size of the stack is usually set to some potentially "low" maximum.
It is usually enough, but I just recently came to the limitation. The program was just segfaulting at strange different locations. It is a pain to debug when you have no idea what are you dealing with.

Having own "stack" for this purpose is a bit more work, but can save a lot of work later when you encounter problems.

This maximum exist at least on Linux and Windows.