Forum unknown
· Programming
Stack size calc
3 messages in this thread
While reading through some messages on another (local) BBS, I came across an
interesting question that had me wondering.
Is there a program that will allow you to calculate the required stack
size for a given program?
I replied that I didn't think that was possible due to the nature of stacks
on the Amiga, but thought I might leave a message here to get some
clarification.
Thanks for any info on this.
Allen
Good question! What's the answer? Part of it would be determining the
maximum level of function calling within the program, if each function
declares a certain amount of stack space for local variables, then the
stack can grow as the program executes. This is at least part of the
problem, as you need to determine the operating system overhead in terms of
the stack, too. I think it's a matter of guesswork, it's not something
stuck in the executable, or easily analyzed from the source code.
Good question! What's the answer? Part of it would be determining the
maximum level of function calling within the program, if each function
declares a certain amount of stack space for local variables, then the
stack can grow as the program executes. This is at least part of the
problem, as you need to determine the operating system overhead in terms of
the stack, too. I think it's a matter of guesswork, it's not something
stuck in the executable, or easily analyzed from the source code.